FileContent - new data input other there string
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- powershell, yaml
- Lĩnh vực
- cli
Hướng nghiên cứu
Look at the FileContent resource implementation in the DSC v3 codebase, likely under a resources or providers directory. Understand how content is currently parsed and stored as a string. The goal is to allow a YAML multiline string (using '|') as input instead of requiring a single escaped string. Check existing tests for FileContent to see the expected format and add a test for the new input style.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary of the new feature / enhancement
Hi as Operation I like to use this resource to create web.config or CA.inf
Now when we have file that looks like this:
[Version]
Signature="$Windows NT$"
[PolicyStatementExtension]
Policies=InternalPolicy
[InternalPolicy]
OID=1.2.3.4.1455.67.89.5
Notice="Legal Policy Statement"
URL=https://pki.corp.contoso.com/pki/cps.txt
[Certsrv_Server]
RenewalKeyLength=2048
RenewalValidityPeriod=Years
RenewalValidityPeriodUnits=5
CRLPeriod=Weeks
CRLPeriodUnits=1
LoadDefaultTemplates=0
AlternateSignatureAlgorithm=1
[CRLDistributionPoint]
URL=http://pki.corp.contoso.com/cdp/WingtipToysRootCA.crl
[AuthorityInformationAccess]
URL=http://pki.corp.contoso.com/Public/myCA.crt
When I like to pass this to DSC v3 I nedd to convert this to string
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: Test File
type: Microsoft.Filesystem.File/Content
properties:
_exist: true
path: C:\dsc\config\file-content\New\CAPolicy.inf
content: "[string('[Version]\r\nSignature=\"$Windows NT$\"\r\n\r\n[PolicyStatementExtension]\r\nPolicies=InternalPolicy\r\n\r\n[InternalPolicy]\r\nOID=1.2.3.4.1455.67.89.5\r\nNotice=\"Legal Policy Statement\"\r\nURL=https://pki.corp.contoso.com/pki/cps.txt\r\n\r\n[Certsrv_Server]\r\nRenewalKeyLength=2048\r\nRenewalValidityPeriod=Years\r\nRenewalValidityPeriodUnits=5\r\nCRLPeriod=Weeks\r\nCRLPeriodUnits=1\r\nLoadDefaultTemplates=0\r\nAlternateSignatureAlgorithm=1\r\n\r\n[CRLDistributionPoint]\r\nURL=http://pki.corp.contoso.com/cdp/WingtipToysRootCA.crl\r\n\r\n[AuthorityInformationAccess]\r\nURL=http://pki.corp.contoso.com/Public/myCA.crt')]"
Proposed technical implementation details (optional)
Suggestion mayby how this can look like
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: ConfigureCertPolicy
type: Microsoft.Windows/FileContent # or Microsoft.DSC.Transitional/PowerShellScript
properties:
path: 'C:\Windows\CAPolicy.inf'
content: |
[Version]
Signature="$Windows NT$"
[PolicyStatementExtension]
Policies=InternalPolicy
[InternalPolicy]
OID=1.2.3.4.1455.67.89.5
Notice="Legal Policy Statement"
URL=https://pki.corp.contoso.com/pki/cps.txt
[Certsrv_Server]
RenewalKeyLength=2048
RenewalValidityPeriod=Years
RenewalValidityPeriodUnits=5
CRLPeriod=Weeks
CRLPeriodUnits=1
LoadDefaultTemplates=0
AlternateSignatureAlgorithm=1
[CRLDistributionPoint]
URL=http://pki.corp.contoso.com/cdp/WingtipToysRootCA.crl
[AuthorityInformationAccess]
URL=http://pki.corp.contoso.com/Public/myCA.crt
- Ngôn ngữ chính
- Rust
- Star
- 526
- Fork
- 76
- Merge trung bình
- 4 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 25
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của PowerShell/DSC
-
Issue-Enhancement Needs Triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
PowerShell/DSC#1729 ·
-
Issue-Bug Need-Review
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
PowerShell/DSC#1727 · 4 bình luận ·
-
Issue-Enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 62/100
PowerShell/DSC#1722 · 3 bình luận ·
-
Dev-UX Needs Triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
PowerShell/DSC#1694 ·
-
Issue-Enhancement Needs Triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
PowerShell/DSC#1683 · 5 bình luận ·
Tất cả issue của PowerShell/DSC
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
TheLarkInn/aipm#2413 ·
-
documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
alexgorbatchev/simple-ptt#15 ·
-
tooling
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
todo:ticket
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
taikoxyz/taiko-mono#22168 · 1 bình luận ·