From a7c71f3cce2db0bd8b0363c2babf642d78e65dfa Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Wed, 28 Feb 2024 13:49:18 -0800 Subject: [PATCH 1/4] rename `provider` to `adapter` --- docs/reference/cli/resource/list.md | 10 ++-- .../schemas/config/functions/resourceId.md | 4 +- docs/reference/schemas/config/resource.md | 6 +-- .../schemas/outputs/resource/list.md | 12 ++--- .../schemas/resource/manifest/provider.md | 34 ++++++------- .../schemas/resource/manifest/root.md | 12 ++--- dsc/src/resource_command.rs | 20 ++++---- dsc_lib/src/configure/mod.rs | 6 +-- dsc_lib/src/discovery/command_discovery.rs | 50 +++++++++---------- dsc_lib/src/dscerror.rs | 2 +- dsc_lib/src/dscresources/dscresource.rs | 2 +- dsc_lib/src/dscresources/resource_manifest.rs | 14 +++--- .../TestPSRepository/TestPSRepository.psm1 | 12 ++--- .../TestPSRepository.schema.mof | 2 +- .../Tests/powershellgroup.resource.tests.ps1 | 2 +- .../powershellgroup.dsc.resource.json | 6 +-- .../windowspowershellgroup.resource.json_todo | 5 +- registry/registry.dsc.resource.json | 2 +- .../08/bundled/outputs/resource/list.json | 22 ++++---- .../2023/08/bundled/resource/manifest.json | 18 +++---- .../08/bundled/resource/manifest.vscode.json | 42 ++++++++-------- schemas/2023/08/outputs/resource/list.json | 6 +-- schemas/2023/08/resource/manifest.json | 6 +-- .../2023/08/resource/manifest.provider.json | 12 ++--- .../10/bundled/outputs/resource/list.json | 22 ++++---- .../2023/10/bundled/resource/manifest.json | 18 +++---- .../10/bundled/resource/manifest.vscode.json | 42 ++++++++-------- schemas/2023/10/outputs/resource/list.json | 6 +-- schemas/2023/10/resource/manifest.json | 6 +-- .../2023/10/resource/manifest.provider.json | 12 ++--- schemas/src/outputs/resource/list.yaml | 6 +-- schemas/src/resource/manifest.provider.yaml | 34 ++++++------- schemas/src/resource/manifest.yaml | 26 +++++----- tools/test_group_resource/src/main.rs | 4 +- .../testGroup.dsc.resource.json | 2 +- .../tests/provider.tests.ps1 | 8 +-- wmigroup/wmigroup.dsc.resource.json.optout | 6 +-- 37 files changed, 249 insertions(+), 250 deletions(-) diff --git a/docs/reference/cli/resource/list.md b/docs/reference/cli/resource/list.md index 30505139..60fdeda2 100644 --- a/docs/reference/cli/resource/list.md +++ b/docs/reference/cli/resource/list.md @@ -24,7 +24,7 @@ discovers resources by first searching the `PATH` or `DSC_RESOURCE_PATH` environ `.dsc.resource.json`, `.dsc.resource.yml`, and `dsc.resource.yaml` files. For more information about the environment variables DSC uses, see [Environment variables][01] -If any of the discovered resources are resource providers, DSC then calls the providers to list +If any of the discovered resources are resource adapters, DSC then calls the adapters to list their resources, too. DSC returns the list of discovered resources with their implementation information and metadata. If @@ -47,9 +47,9 @@ type version tags description ---- ------- ---- ----------- Test/TestGroup 0.1.0 Microsoft/OSInfo 0.1.0 {os, linux, windows, macos} Returns information about the operating system. -Microsoft.Windows/Registry 0.1.0 {Windows, NT} Registry configuration provider for the Windows Registry +Microsoft.Windows/Registry 0.1.0 {Windows, NT} Registry configuration adapter for the Windows Registry This is a test resource. -DSC/PowerShellGroup 0.1.0 {PowerShell} Resource provider to classic DSC Powershell resources. +DSC/PowerShellGroup 0.1.0 {PowerShell} Resource adapter to classic DSC Powershell resources. DSC/AssertionGroup 0.1.0 `test` will be invoked for all resources in the supplied configuration. DSC/ParallelGroup 0.1.0 All resources in the supplied configuration run concurrently. This is a test resource. @@ -85,7 +85,7 @@ Type Version Requires Description --------------------------------------------------------------------------------------------------------------- DSC/Group 0.1.0 All resources in the supplied configuration is treated as a group. DSC/ParallelGroup 0.1.0 All resources in the supplied configuration run concurrently. -DSC/PowerShellGroup 0.1.0 Resource provider to classic DSC Powershell resources. +DSC/PowerShellGroup 0.1.0 Resource adapter to classic DSC Powershell resources. DSC/AssertionGroup 0.1.0 `test` will be invoked for all resources in the supplied configuration. ``` @@ -118,7 +118,7 @@ dsc resource list --tags Windows --tags Linux ```output Type Version Requires Description ------------------------------------------------------------------------------------------------------- -Microsoft.Windows/Registry 0.1.0 Registry configuration provider for the Windows Registry +Microsoft.Windows/Registry 0.1.0 Registry configuration adapter for the Windows Registry Microsoft/OSInfo 0.1.0 Returns information about the operating system. ``` diff --git a/docs/reference/schemas/config/functions/resourceId.md b/docs/reference/schemas/config/functions/resourceId.md index 3e16fa76..44fe8672 100644 --- a/docs/reference/schemas/config/functions/resourceId.md +++ b/docs/reference/schemas/config/functions/resourceId.md @@ -24,9 +24,9 @@ This function enables instances to reference another instance for the [dependsOn > [!NOTE] > When using the `resourceId` function for [nested resource instances][02], instances can only -> reference other instances in the same resource provider or group instance. They can't use the +> reference other instances in the same resource adapter or group instance. They can't use the > `resourceId()` function to lookup instances at the top-level of the configuration document or -> inside another provider or group instance. +> inside another adapter or group instance. ## Examples diff --git a/docs/reference/schemas/config/resource.md b/docs/reference/schemas/config/resource.md index cf010204..0d10bb5b 100644 --- a/docs/reference/schemas/config/resource.md +++ b/docs/reference/schemas/config/resource.md @@ -122,12 +122,12 @@ resource named `Tailspin Key`: > [!NOTE] > When defining dependencies for [nested resource instances][03], instances can only reference -> dependencies in the same resource provider or group instance. They can't use the `resourceId()` +> dependencies in the same resource adapter or group instance. They can't use the `resourceId()` > function to lookup instances at the top-level of the configuration document or inside another -> provider or group instance. +> adapter or group instance. > > If a top-level instance depends on a nested instance, use the `resourceId()` function to lookup -> the instance of the provider or group containing the dependency instance instead. +> the instance of the adapter or group containing the dependency instance instead. For more information about using functions in configuration documents, see [DSC Configuration document functions reference][04]. For more information about the `resourceId()` diff --git a/docs/reference/schemas/outputs/resource/list.md b/docs/reference/schemas/outputs/resource/list.md index 984b9935..e99e1838 100644 --- a/docs/reference/schemas/outputs/resource/list.md +++ b/docs/reference/schemas/outputs/resource/list.md @@ -78,7 +78,7 @@ Required: true ### path Represents the path to the resource's manifest on the machine. For resources made available through -a provider, this property identifies the path to the file that defines the resource instead. +an adapter, this property identifies the path to the file that defines the resource instead. ```yaml Type: string @@ -88,7 +88,7 @@ Required: true ### directory Represents the path to the folder containing the resource's manifest on the machine. For resources -made available through a provider, this property identifies the path to the folder containing the +made available through an adapter, this property identifies the path to the folder containing the file that defines the resource instead. ```yaml @@ -113,7 +113,7 @@ this property is `null`, the author is unknown. ```yaml @@ -123,13 +123,13 @@ Required: true ### properties -Defines the property names for resources made available through a provider resource. For other +Defines the property names for resources made available through an adapter resource. For other resources, this property is an empty array. ```yaml @@ -141,7 +141,7 @@ ItemsPattern: ^\w+$ ### requires -Defines the fully qualified type name of the provider resource that this resource is made available +Defines the fully qualified type name of the adapter resource that this resource is made available through. ```yaml diff --git a/docs/reference/schemas/resource/manifest/provider.md b/docs/reference/schemas/resource/manifest/provider.md index e3134e4c..307fb0cb 100644 --- a/docs/reference/schemas/resource/manifest/provider.md +++ b/docs/reference/schemas/resource/manifest/provider.md @@ -1,38 +1,38 @@ --- -description: JSON schema reference for the 'provider' property in a DSC Resource manifest +description: JSON schema reference for the 'adapter' property in a DSC Resource manifest ms.date: 01/17/2024 ms.topic: reference -title: DSC Resource manifest provider property schema reference +title: DSC Resource manifest adapter property schema reference --- -# DSC Resource manifest provider property schema reference +# DSC Resource manifest adapter property schema reference ## Synopsis -Defines a DSC Resource as a DSC Resource Provider. +Defines a DSC Resource as a DSC Resource Adapter. ## Metadata ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.provider.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.adapter.json Type: object ``` ## Description -DSC Resource Providers must define the `provider` property in their manifest. This property -identifies the resource as a provider and defines how DSC can call the provider to get the -resources the provider supports and how to pass resource instances to the provider. +DSC Resource Adapters must define the `adapter` property in their manifest. This property +identifies the resource as an adapter and defines how DSC can call the adapter to get the +resources the adapter supports and how to pass resource instances to the adapter. ## Examples ### Example 1 - DSC/PowerShellGroup -This example is from the `DSC/PowerShellGroup` DSC Resource Provider. +This example is from the `DSC/PowerShellGroup` DSC Resource Adapter. ```json -"provider": { +"adapter": { "config": "full", "list": { "executable": "pwsh", @@ -47,7 +47,7 @@ This example is from the `DSC/PowerShellGroup` DSC Resource Provider. } ``` -The manifest sets `config` to `full`, indicating that the provider expects a JSON blob representing +The manifest sets `config` to `full`, indicating that the adapter expects a JSON blob representing the full and unprocessed configuration from `stdin`. It defines `list.executable` as `pwsh`. The arguments defined in `list.args` ensure that DSC runs @@ -59,7 +59,7 @@ PowerShell: - To invoke the `powershellgroup.resource.ps1` script in the same folder as the `dsc` command and pass the `List` argument. -With this definition, DSC calls the `list` method for this provider by running: +With this definition, DSC calls the `list` method for this adapter by running: ```sh pwsh -NoLogo -NonInteractive -NoProfile -Command "./powershellgroup.resource.ps1 List" @@ -67,7 +67,7 @@ pwsh -NoLogo -NonInteractive -NoProfile -Command "./powershellgroup.resource.ps1 ## Required Properties -The `provider` definition must include these properties: +The `adapter` definition must include these properties: - [config](#config) - [list](#list) @@ -76,12 +76,12 @@ The `provider` definition must include these properties: ### config -The `config` property defines how the provider expects to receive resource configurations. The +The `config` property defines how the adapter expects to receive resource configurations. The value must be one of the following options: -- `full` - Indicates that the provider expects a JSON blob containing the full and +- `full` - Indicates that the adapter expects a JSON blob containing the full and unprocessed configuration as a single JSON blob over `stdin`. -- `sequence` - Indicates that the provider expects each resource's configuration as +- `sequence` - Indicates that the adapter expects each resource's configuration as a [JSON Line][01] over `stdin`. ```yaml @@ -91,7 +91,7 @@ ValidValues: [full, sequence] ### list -The `list` property defines how to call the provider to list the resources it supports. The value +The `list` property defines how to call the adapter to list the resources it supports. The value of this property must be an object and define the `executable` subproperty. ```yaml diff --git a/docs/reference/schemas/resource/manifest/root.md b/docs/reference/schemas/resource/manifest/root.md index fc268094..594e6532 100644 --- a/docs/reference/schemas/resource/manifest/root.md +++ b/docs/reference/schemas/resource/manifest/root.md @@ -215,14 +215,14 @@ Type: object Required: false ``` -### provider +### adapter -When specified, the `provider` property defines the resource as a DSC Resource Provider. +When specified, the `adapter` property defines the resource as a DSC Resource Adapter. The value of this property must be an object. The object's `list` and `config` properties are -mandatory. The `list` property defines how to call the provider to return the resources that the -provider can manage. The `config` property defines how the provider expects input. For more -information, see the [DSC Resource manifest provider property schema reference][11]. +mandatory. The `list` property defines how to call the adapter to return the resources that the +adapter can manage. The `config` property defines how the adapter expects input. For more +information, see the [DSC Resource manifest adapter property schema reference][11]. ### exitCodes @@ -268,5 +268,5 @@ Required: true [08]: set.md [09]: test.md [10]: validate.md -[11]: provider.md +[11]: adapter.md [12]: schema/property.md diff --git a/dsc/src/resource_command.rs b/dsc/src/resource_command.rs index 427a796d..181eb094 100644 --- a/dsc/src/resource_command.rs +++ b/dsc/src/resource_command.rs @@ -27,7 +27,7 @@ pub fn get(dsc: &DscManager, resource_type: &str, mut input: String, format: &Op if let Some(pr) = get_resource(dsc, requires) { resource = pr; } else { - error!("Provider {} not found", requires); + error!("Adapter {} not found", requires); return; }; } @@ -64,7 +64,7 @@ pub fn get_all(dsc: &DscManager, resource_type: &str, format: &Option) { if input.is_empty() { @@ -118,7 +118,7 @@ pub fn set(dsc: &DscManager, resource_type: &str, mut input: String, format: &Op if let Some(pr) = get_resource(dsc, requires) { resource = pr; } else { - error!("Provider {} not found", requires); + error!("Adapter {} not found", requires); return; }; } @@ -146,7 +146,7 @@ pub fn set(dsc: &DscManager, resource_type: &str, mut input: String, format: &Op /// /// # Panics /// -/// Will panic if provider-based resource is not found. +/// Will panic if adapter-based resource is not found. /// pub fn test(dsc: &DscManager, resource_type: &str, mut input: String, format: &Option) { let Some(mut resource) = get_resource(dsc, resource_type) else { @@ -161,7 +161,7 @@ pub fn test(dsc: &DscManager, resource_type: &str, mut input: String, format: &O if let Some(pr) = get_resource(dsc, requires) { resource = pr; } else { - error!("Provider {} not found", requires); + error!("Adapter {} not found", requires); return; }; } @@ -216,20 +216,20 @@ pub fn export(dsc: &mut DscManager, resource_type: &str, format: &Option = None; + let mut adapter_resource: Option<&DscResource> = None; if let Some(requires) = &dsc_resource.requires { input = add_type_name_to_json(input, dsc_resource.type_name.clone()); if let Some(pr) = get_resource(dsc, requires) { - provider_resource = Some(pr); + adapter_resource = Some(pr); } else { - error!("Provider '{}' not found", requires); + error!("Adapter '{}' not found", requires); return; }; } let mut conf = Configuration::new(); - if let Err(err) = add_resource_export_results_to_configuration(dsc_resource, provider_resource, &mut conf, &input) { + if let Err(err) = add_resource_export_results_to_configuration(dsc_resource, adapter_resource, &mut conf, &input) { error!("Error: {err}"); exit(EXIT_DSC_ERROR); } diff --git a/dsc_lib/src/configure/mod.rs b/dsc_lib/src/configure/mod.rs index f717c2f8..dc357375 100644 --- a/dsc_lib/src/configure/mod.rs +++ b/dsc_lib/src/configure/mod.rs @@ -52,10 +52,10 @@ pub enum ErrorAction { /// # Errors /// /// This function will return an error if the underlying resource fails. -pub fn add_resource_export_results_to_configuration(resource: &DscResource, provider_resource: Option<&DscResource>, conf: &mut Configuration, input: &str) -> Result<(), DscError> { +pub fn add_resource_export_results_to_configuration(resource: &DscResource, adapter_resource: Option<&DscResource>, conf: &mut Configuration, input: &str) -> Result<(), DscError> { - let export_result = match provider_resource { - Some(_) => provider_resource.unwrap().export(input)?, + let export_result = match adapter_resource { + Some(_) => adapter_resource.unwrap().export(input)?, _ => resource.export(input)? }; diff --git a/dsc_lib/src/discovery/command_discovery.rs b/dsc_lib/src/discovery/command_discovery.rs index d4575c6f..74b02dc0 100644 --- a/dsc_lib/src/discovery/command_discovery.rs +++ b/dsc_lib/src/discovery/command_discovery.rs @@ -51,7 +51,7 @@ impl CommandDiscovery { pb.set_message("Searching for resources"); let mut resources: BTreeMap = BTreeMap::new(); - let mut provider_resources: Vec = Vec::new(); + let mut adapter_resources: Vec = Vec::new(); let mut remaining_required_resource_types = required_resource_types.to_owned(); // try DSC_RESOURCE_PATH env var first otherwise use PATH let path_env = match env::var_os("DSC_RESOURCE_PATH") { @@ -97,8 +97,8 @@ impl CommandDiscovery { if resource.manifest.is_some() { let manifest = import_manifest(resource.manifest.clone().unwrap())?; - if manifest.provider.is_some() { - provider_resources.push(resource.type_name.to_lowercase()); + if manifest.adapter.is_some() { + adapter_resources.push(resource.type_name.to_lowercase()); resources.insert(resource.type_name.to_lowercase(), resource.clone()); } } @@ -123,30 +123,30 @@ impl CommandDiscovery { } } - debug!("Found {} matching non-provider resources", resources.len() - provider_resources.len()); + debug!("Found {} matching non-adapter resources", resources.len() - adapter_resources.len()); - // now go through the provider resources and add them to the list of resources - for provider in provider_resources { - debug!("Enumerating resources for provider {}", provider); + // now go through the adapter resources and add them to the list of resources + for adapter in adapter_resources { + debug!("Enumerating resources for adapter {}", adapter); let pb_adapter = multi_progress_bar.add(ProgressBar::new(1)); pb_adapter.enable_steady_tick(Duration::from_millis(120)); pb_adapter.set_style(ProgressStyle::with_template( "{spinner:.green} [{elapsed_precise:.cyan}] {msg:.white}" )?); - pb_adapter.set_message(format!("Enumerating resources for adapter {provider}")); - let provider_resource = resources.get(&provider).unwrap(); - let provider_type_name = provider_resource.type_name.clone(); - let manifest = import_manifest(provider_resource.manifest.clone().unwrap())?; - let mut provider_resources_count = 0; + pb_adapter.set_message(format!("Enumerating resources for adapter {adapter}")); + let adapter_resource = resources.get(&adapter).unwrap(); + let adapter_type_name = adapter_resource.type_name.clone(); + let manifest = import_manifest(adapter_resource.manifest.clone().unwrap())?; + let mut adapter_resources_count = 0; // invoke the list command - let list_command = manifest.provider.unwrap().list; - let (exit_code, stdout, stderr) = match invoke_command(&list_command.executable, list_command.args, None, Some(&provider_resource.directory), None) + let list_command = manifest.adapter.unwrap().list; + let (exit_code, stdout, stderr) = match invoke_command(&list_command.executable, list_command.args, None, Some(&adapter_resource.directory), None) { Ok((exit_code, stdout, stderr)) => (exit_code, stdout, stderr), Err(e) => { - /* In case of "resource list" operation - print failure from provider as warning + /* In case of "resource list" operation - print failure from adapter as warning In case of other resource/config operations: - print failure from provider as error because this provider was specifically requested by current resource/config operation*/ + print failure from adapter as error because this adapter was specifically requested by current resource/config operation*/ if return_all_resources { warn!("Could not start {}: {}", list_command.executable, e); } else { @@ -157,13 +157,13 @@ impl CommandDiscovery { }; if exit_code != 0 { - /* In case of "resource list" operation - print failure from provider as warning + /* In case of "resource list" operation - print failure from adapter as warning In case of other resource/config operations: - print failure from provider as error because this provider was specifically requested by current resource/config operation*/ + print failure from adapter as error because this adapter was specifically requested by current resource/config operation*/ if return_all_resources { - warn!("Provider failed to list resources with exit code {exit_code}: {stderr}"); + warn!("Adapter failed to list resources with exit code {exit_code}: {stderr}"); } else { - error!("Provider failed to list resources with exit code {exit_code}: {stderr}"); + error!("Adapter failed to list resources with exit code {exit_code}: {stderr}"); } } @@ -172,16 +172,16 @@ impl CommandDiscovery { Result::Ok(resource) => { if resource.requires.is_none() { if return_all_resources { - warn!("{}", DscError::MissingRequires(provider.clone(), resource.type_name.clone()).to_string()); + warn!("{}", DscError::MissingRequires(adapter.clone(), resource.type_name.clone()).to_string()); } else { - error!("{}", DscError::MissingRequires(provider.clone(), resource.type_name.clone()).to_string()); + error!("{}", DscError::MissingRequires(adapter.clone(), resource.type_name.clone()).to_string()); } continue; } if return_all_resources { resources.insert(resource.type_name.to_lowercase(), resource); - provider_resources_count += 1; + adapter_resources_count += 1; } else if remaining_required_resource_types.contains(&resource.type_name.to_lowercase()) { @@ -204,9 +204,9 @@ impl CommandDiscovery { } }; } - pb_adapter.finish_with_message(format!("Done with {provider}")); + pb_adapter.finish_with_message(format!("Done with {adapter}")); - debug!("Provider {} listed {} matching resources", provider_type_name, provider_resources_count); + debug!("Adapter '{}' listed {} matching resources", adapter_type_name, adapter_resources_count); } pb.finish_with_message("Discovery complete"); diff --git a/dsc_lib/src/dscerror.rs b/dsc_lib/src/dscerror.rs index ab97c16a..3c5defac 100644 --- a/dsc_lib/src/dscerror.rs +++ b/dsc_lib/src/dscerror.rs @@ -59,7 +59,7 @@ pub enum DscError { #[error("Missing manifest: {0}")] MissingManifest(String), - #[error("Provider source '{0}' missing 'requires' property for resource '{1}'")] + #[error("Adapter-based resource '{0}' missing 'requires' property for resource '{1}'")] MissingRequires(String, String), #[error("Schema missing from manifest: {0}")] diff --git a/dsc_lib/src/dscresources/dscresource.rs b/dsc_lib/src/dscresources/dscresource.rs index aeaf0320..5ece5322 100644 --- a/dsc_lib/src/dscresources/dscresource.rs +++ b/dsc_lib/src/dscresources/dscresource.rs @@ -31,7 +31,7 @@ pub struct DscResource { pub author: Option, /// The properties of the resource. pub properties: Vec, - /// The required resource provider for the resource. + /// The required resource adapter for the resource. pub requires: Option, /// The manifest of the resource. pub manifest: Option, diff --git a/dsc_lib/src/dscresources/resource_manifest.rs b/dsc_lib/src/dscresources/resource_manifest.rs index 29c7c519..d305c180 100644 --- a/dsc_lib/src/dscresources/resource_manifest.rs +++ b/dsc_lib/src/dscresources/resource_manifest.rs @@ -37,9 +37,9 @@ pub struct ResourceManifest { /// Details how to call the Validate method of the resource. #[serde(skip_serializing_if = "Option::is_none")] pub validate: Option, - /// Indicates the resource is a provider of other resources. + /// Indicates the resource is a adapter of other resources. #[serde(skip_serializing_if = "Option::is_none")] - pub provider: Option, + pub adapter: Option, /// Mapping of exit codes to descriptions. Zero is always success and non-zero is always failure. #[serde(rename = "exitCodes", skip_serializing_if = "Option::is_none")] pub exit_codes: Option>, @@ -167,19 +167,19 @@ pub struct ExportMethod { } #[derive(Debug, Clone, PartialEq, Deserialize, Serialize, JsonSchema)] -pub struct Provider { - /// The way to list provider supported resources. +pub struct Adapter { + /// The way to list adapter supported resources. pub list: ListMethod, - /// Defines how the provider supports accepting configuraiton. + /// Defines how the adapter supports accepting configuraiton. pub config: ConfigKind, } #[derive(Debug, Clone, PartialEq, Deserialize, Serialize, JsonSchema)] pub enum ConfigKind { - /// The provider accepts full unprocessed configuration. + /// The adapter accepts full unprocessed configuration. #[serde(rename = "full")] Full, - /// The provider accepts configuration as a sequence. + /// The adapter accepts configuration as a sequence. #[serde(rename = "sequence")] Sequence, } diff --git a/powershellgroup/Tests/PSTestModule/DscResources/TestPSRepository/TestPSRepository.psm1 b/powershellgroup/Tests/PSTestModule/DscResources/TestPSRepository/TestPSRepository.psm1 index d02c38d4..a3da095f 100644 --- a/powershellgroup/Tests/PSTestModule/DscResources/TestPSRepository/TestPSRepository.psm1 +++ b/powershellgroup/Tests/PSTestModule/DscResources/TestPSRepository/TestPSRepository.psm1 @@ -21,7 +21,7 @@ function Get-TargetResource { PublishLocation = $null ScriptPublishLocation = $null InstallationPolicy = $null - PackageManagementProvider = $null + PackageManagementAdapter = $null Trusted = $false Registered = $false } @@ -33,7 +33,7 @@ function Get-TargetResource { $returnValue.PublishLocation = 'https://www.powershellgallery.com/api/v2/package/' $returnValue.ScriptPublishLocation = 'https://www.powershellgallery.com/api/v2/package/' $returnValue.InstallationPolicy = 'Untrusted' - $returnValue.PackageManagementProvider = 'NuGet' + $returnValue.PackageManagementAdapter = 'NuGet' $returnValue.Trusted = $False $returnValue.Registered = $True } @@ -55,10 +55,10 @@ function Test-TargetResource { [Parameter()] [System.String] - $PackageManagementProvider + $PackageManagementAdapter ) - - if (($Name -eq "TestPSRepository1") -and ($PackageManagementProvider -eq 'NuGet')) + + if (($Name -eq "TestPSRepository1") -and ($PackageManagementAdapter -eq 'NuGet')) { return $true } @@ -78,6 +78,6 @@ function Set-TargetResource { [Parameter()] [System.String] - $PackageManagementProvider + $PackageManagementAdapter ) } diff --git a/powershellgroup/Tests/PSTestModule/DscResources/TestPSRepository/TestPSRepository.schema.mof b/powershellgroup/Tests/PSTestModule/DscResources/TestPSRepository/TestPSRepository.schema.mof index dd1f0aa3..5dc745ca 100644 --- a/powershellgroup/Tests/PSTestModule/DscResources/TestPSRepository/TestPSRepository.schema.mof +++ b/powershellgroup/Tests/PSTestModule/DscResources/TestPSRepository/TestPSRepository.schema.mof @@ -8,7 +8,7 @@ class TestPSRepository : OMI_BaseResource [Write] String PublishLocation; [Write] String ScriptPublishLocation; [Write, ValueMap{"Trusted","Untrusted"}, Values{"Trusted","Untrusted"}] String InstallationPolicy; - [Write] String PackageManagementProvider; + [Write] String PackageManagementAdapter; [Read] Boolean Trusted; [Read] Boolean Registered; }; diff --git a/powershellgroup/Tests/powershellgroup.resource.tests.ps1 b/powershellgroup/Tests/powershellgroup.resource.tests.ps1 index 9ce6956a..38ec3e78 100644 --- a/powershellgroup/Tests/powershellgroup.resource.tests.ps1 +++ b/powershellgroup/Tests/powershellgroup.resource.tests.ps1 @@ -62,7 +62,7 @@ Describe 'PowerShellGroup resource tests' { It 'Test works on script-based resource' -Skip:(!$IsWindows){ - $r = "{'Name':'TestPSRepository1','PackageManagementProvider':'NuGet'}" | dsc resource test -r PSTestModule/TestPSRepository + $r = "{'Name':'TestPSRepository1','PackageManagementAdapter':'NuGet'}" | dsc resource test -r PSTestModule/TestPSRepository $LASTEXITCODE | Should -Be 0 $res = $r | ConvertFrom-Json $res.actualState.InDesiredState | Should -Be $True diff --git a/powershellgroup/powershellgroup.dsc.resource.json b/powershellgroup/powershellgroup.dsc.resource.json index 4b01ebbe..7f9f9e22 100644 --- a/powershellgroup/powershellgroup.dsc.resource.json +++ b/powershellgroup/powershellgroup.dsc.resource.json @@ -2,11 +2,11 @@ "$schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/bundled/resource/manifest.json", "type": "DSC/PowerShellGroup", "version": "0.1.0", - "description": "Resource provider to classic DSC Powershell resources.", + "description": "Resource adapter to classic DSC Powershell resources.", "tags": [ "PowerShell" ], - "provider": { + "adapter": { "list": { "executable": "pwsh", "args": [ @@ -76,7 +76,7 @@ "-Command", "$Input | ./powershellgroup.resource.ps1 Validate" ] - }, + }, "exitCodes": { "0": "Success", "1": "Error" diff --git a/powershellgroup/windowspowershellgroup.resource.json_todo b/powershellgroup/windowspowershellgroup.resource.json_todo index 54015ca2..d7828e13 100644 --- a/powershellgroup/windowspowershellgroup.resource.json_todo +++ b/powershellgroup/windowspowershellgroup.resource.json_todo @@ -2,8 +2,8 @@ "manifestVersion": "1.0", "type": "DSC/WindowsPowerShellGroup", "version": "0.1.0", - "description": "Resource provider to classic DSC Powershell resources in Windows PowerShell.", - "provider": { + "description": "Resource adapter to classic DSC Powershell resources in Windows PowerShell.", + "adapter": { "list": { "executable": "powershell", "args": [ @@ -56,4 +56,3 @@ "1": "Error" } } - \ No newline at end of file diff --git a/registry/registry.dsc.resource.json b/registry/registry.dsc.resource.json index 74cec84c..6f920a1d 100644 --- a/registry/registry.dsc.resource.json +++ b/registry/registry.dsc.resource.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/bundled/resource/manifest.json", "type": "Microsoft.Windows/Registry", - "description": "Registry configuration provider for the Windows Registry", + "description": "Registry configuration adapter for the Windows Registry", "tags": [ "Windows", "NT" diff --git a/schemas/2023/08/bundled/outputs/resource/list.json b/schemas/2023/08/bundled/outputs/resource/list.json index 5b5f4acd..8665d597 100644 --- a/schemas/2023/08/bundled/outputs/resource/list.json +++ b/schemas/2023/08/bundled/outputs/resource/list.json @@ -73,8 +73,8 @@ } }, "requires": { - "title": "Required DSC Resource Provider", - "description": "Defines the fully qualified type name of the DSC Resource Provider the DSC Resource depends on.", + "title": "Required DSC Resource Adapter", + "description": "Defines the fully qualified type name of the DSC Resource Adapter the DSC Resource depends on.", "oneOf": [ { "$ref": "/PowerShell/DSC/main/schemas/2023/08/definitions/resourceType.json" @@ -166,8 +166,8 @@ "validate": { "$ref": "/PowerShell/DSC/main/schemas/2023/08/resource/manifest.validate.json" }, - "provider": { - "$ref": "/PowerShell/DSC/main/schemas/2023/08/resource/manifest.provider.json" + "adapter": { + "$ref": "/PowerShell/DSC/main/schemas/2023/08/resource/manifest.adapter.json" }, "exitCodes": { "title": "Exit Codes", @@ -362,11 +362,11 @@ } ] }, - "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/resource/manifest.provider.json": { + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/resource/manifest.adapter.json": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/resource/manifest.provider.json", - "title": "Provider", - "description": "Defines the DSC Resource as a DSC Resource Provider. A DSC Resource Provider enables users to manage resources that don't have their own manifests with DSC.", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/resource/manifest.adapter.json", + "title": "Adapter", + "description": "Defines the DSC Resource as a DSC Resource Adapter. A DSC Resource Adapter enables users to manage resources that don't have their own manifests with DSC.", "type": "object", "required": [ "list", @@ -375,7 +375,7 @@ "properties": { "list": { "title": "List Command", - "description": "Defines how DSC must call the DSC Resource Provider to list its supported DSC Resources.", + "description": "Defines how DSC must call the DSC Resource Adapter to list its supported DSC Resources.", "type": "object", "required": [ "executable" @@ -391,7 +391,7 @@ }, "config": { "title": "Expected Configuration", - "description": "Defines whether the provider expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", + "description": "Defines whether the adapter expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", "type": "string", "enum": [ "full", @@ -696,4 +696,4 @@ "readOnly": true } } -} +} diff --git a/schemas/2023/08/bundled/resource/manifest.json b/schemas/2023/08/bundled/resource/manifest.json index c5d29991..a385dd8b 100644 --- a/schemas/2023/08/bundled/resource/manifest.json +++ b/schemas/2023/08/bundled/resource/manifest.json @@ -58,8 +58,8 @@ "validate": { "$ref": "/PowerShell/DSC/main/schemas/2023/08/resource/manifest.validate.json" }, - "provider": { - "$ref": "/PowerShell/DSC/main/schemas/2023/08/resource/manifest.provider.json" + "adapter": { + "$ref": "/PowerShell/DSC/main/schemas/2023/08/resource/manifest.adapter.json" }, "exitCodes": { "title": "Exit Codes", @@ -271,11 +271,11 @@ } ] }, - "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/resource/manifest.provider.json": { + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/resource/manifest.adapter.json": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/resource/manifest.provider.json", - "title": "Provider", - "description": "Defines the DSC Resource as a DSC Resource Provider. A DSC Resource Provider enables users to manage resources that don't have their own manifests with DSC.", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/resource/manifest.adapter.json", + "title": "Adapter", + "description": "Defines the DSC Resource as a DSC Resource Adapter. A DSC Resource Adapter enables users to manage resources that don't have their own manifests with DSC.", "type": "object", "required": [ "list", @@ -284,7 +284,7 @@ "properties": { "list": { "title": "List Command", - "description": "Defines how DSC must call the DSC Resource Provider to list its supported DSC Resources.", + "description": "Defines how DSC must call the DSC Resource Adapter to list its supported DSC Resources.", "type": "object", "required": [ "executable" @@ -300,7 +300,7 @@ }, "config": { "title": "Expected Configuration", - "description": "Defines whether the provider expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", + "description": "Defines whether the adapter expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", "type": "string", "enum": [ "full", @@ -605,4 +605,4 @@ "readOnly": true } } -} +} diff --git a/schemas/2023/08/bundled/resource/manifest.vscode.json b/schemas/2023/08/bundled/resource/manifest.vscode.json index 9fc6ff97..abe57b9b 100644 --- a/schemas/2023/08/bundled/resource/manifest.vscode.json +++ b/schemas/2023/08/bundled/resource/manifest.vscode.json @@ -100,8 +100,8 @@ } }, { - "label": " Define a resource (provider)", - "markdownDescription": "Defines a provider resource that enables users to define non-command-based DSC Resources in\nthe configuration.", + "label": " Define a resource (adapter)", + "markdownDescription": "Defines a adapter resource that enables users to define non-command-based DSC Resources in\nthe configuration.", "body": { "$schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/bundled/resource/manifest.json", "type": "${1:owner.area.group}/${2:${TM_FILENAME_BASE/^(.*?)[\\.]dsc[\\.]resource/$1/}}", @@ -131,7 +131,7 @@ "implementsPretest": "^${16:false}", "return": "${17:state}" }, - "provider": { + "adapter": { "config": "${18|full,sequence|}", "list": { "executable": "${19:executable name}", @@ -257,8 +257,8 @@ "validate": { "$ref": "#/$defs/PowerShell/DSC/main/schemas/2023/08/resource/manifest.validate.json" }, - "provider": { - "$ref": "#/$defs/PowerShell/DSC/main/schemas/2023/08/resource/manifest.provider.json" + "adapter": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/2023/08/resource/manifest.adapter.json" }, "exitCodes": { "title": "Exit Codes", @@ -675,12 +675,12 @@ } ] }, - "manifest.provider.json": { + "manifest.adapter.json": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/resource/manifest.provider.json", - "title": "Provider", - "description": "Defines the DSC Resource as a DSC Resource Provider. A DSC Resource Provider enables users to manage resources that don't have their own manifests with DSC.", - "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the DSC Resource as a DSC Resource Provider. A DSC Resource Provider enables users to\nmanage resources that don't have their own manifests with DSC.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/provider?view=dsc-3.0&preserve-view=true\n", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/resource/manifest.adapter.json", + "title": "Adapter", + "description": "Defines the DSC Resource as a DSC Resource Adapter. A DSC Resource Adapter enables users to manage resources that don't have their own manifests with DSC.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the DSC Resource as a DSC Resource Adapter. A DSC Resource Adapter enables users to\nmanage resources that don't have their own manifests with DSC.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true\n", "type": "object", "required": [ "list", @@ -689,8 +689,8 @@ "properties": { "list": { "title": "List Command", - "description": "Defines how DSC must call the DSC Resource Provider to list its supported DSC Resources.", - "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC must call the DSC Resource Provider to list its supported DSC Resources.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/provider?view=dsc-3.0&preserve-view=true#list\n", + "description": "Defines how DSC must call the DSC Resource Adapter to list its supported DSC Resources.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC must call the DSC Resource Adapter to list its supported DSC Resources.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#list\n", "type": "object", "required": [ "executable" @@ -698,26 +698,26 @@ "properties": { "executable": { "$ref": "#/$defs/PowerShell/DSC/main/schemas/2023/08/definitions/commandExecutable.json", - "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/provider?view=dsc-3.0&preserve-view=true#executable\n" + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#executable\n" }, "args": { "$ref": "#/$defs/PowerShell/DSC/main/schemas/2023/08/definitions/commandArgs.json", - "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"registry\",\n \"args\": [\"resources\", \"list\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nregistry resources list\n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/provider?view=dsc-3.0&preserve-view=true#args\n" + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"registry\",\n \"args\": [\"resources\", \"list\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nregistry resources list\n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#args\n" } } }, "config": { "title": "Expected Configuration", - "description": "Defines whether the provider expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", + "description": "Defines whether the adapter expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", "type": "string", "enum": [ "full", "sequence" ], - "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the provider expects to receive a full and unprocessed configuration as a\nsingle JSON blob over stdin or a sequence of JSON Lines for each child resource's\nconfigurations.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/provider?view=dsc-3.0&preserve-view=true#config\n", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the adapter expects to receive a full and unprocessed configuration as a\nsingle JSON blob over stdin or a sequence of JSON Lines for each child resource's\nconfigurations.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#config\n", "markdownEnumDescriptions": [ - "_Full and unprocessed config as a JSON blob_\n\n> Indicates that the provider expects a JSON blob containing the full and unprocessed\n> configuration as a single JSON blob over `stdin`.\n", - "_Resource instances as JSON Lines_\n\n> Indicates that the provider expects each resource's configuration as a [JSON Line][01]\n> over `stdin`.\n\n[01]: https://jsonlines.org/\n" + "_Full and unprocessed config as a JSON blob_\n\n> Indicates that the adapter expects a JSON blob containing the full and unprocessed\n> configuration as a single JSON blob over `stdin`.\n", + "_Resource instances as JSON Lines_\n\n> Indicates that the adapter expects each resource's configuration as a [JSON Line][01]\n> over `stdin`.\n\n[01]: https://jsonlines.org/\n" ] } }, @@ -739,7 +739,7 @@ "defaultSnippets": [ { "label": " Define without arguments", - "markdownDescription": "Define the provider config kind and `list` command for the resource when no arguments are\nrequired.\n", + "markdownDescription": "Define the adapter config kind and `list` command for the resource when no arguments are\nrequired.\n", "body": { "config": "$1", "list": { @@ -749,7 +749,7 @@ }, { "label": " Define with arguments", - "markdownDescription": "Define the provider config kind and `list` command for the resource when at least one\nargument is required.\n", + "markdownDescription": "Define the adapter config kind and `list` command for the resource when at least one\nargument is required.\n", "body": { "config": "$1", "list": { @@ -1154,4 +1154,4 @@ } } } -} +} diff --git a/schemas/2023/08/outputs/resource/list.json b/schemas/2023/08/outputs/resource/list.json index 13b4a509..5698890c 100644 --- a/schemas/2023/08/outputs/resource/list.json +++ b/schemas/2023/08/outputs/resource/list.json @@ -73,8 +73,8 @@ } }, "requires": { - "title": "Required DSC Resource Provider", - "description": "Defines the fully qualified type name of the DSC Resource Provider the DSC Resource depends on.", + "title": "Required DSC Resource Adapter", + "description": "Defines the fully qualified type name of the DSC Resource Adapter the DSC Resource depends on.", "oneOf": [ { "$ref": "/PowerShell/DSC/main/schemas/2023/08/definitions/resourceType.json" @@ -88,4 +88,4 @@ "$ref": "/PowerShell/DSC/main/schemas/2023/08/resource/manifest.json" } } -} +} diff --git a/schemas/2023/08/resource/manifest.json b/schemas/2023/08/resource/manifest.json index 25efc748..2046f14c 100644 --- a/schemas/2023/08/resource/manifest.json +++ b/schemas/2023/08/resource/manifest.json @@ -58,8 +58,8 @@ "validate": { "$ref": "/PowerShell/DSC/main/schemas/2023/08/resource/manifest.validate.json" }, - "provider": { - "$ref": "/PowerShell/DSC/main/schemas/2023/08/resource/manifest.provider.json" + "adapter": { + "$ref": "/PowerShell/DSC/main/schemas/2023/08/resource/manifest.adapter.json" }, "exitCodes": { "title": "Exit Codes", @@ -92,4 +92,4 @@ "$ref": "/PowerShell/DSC/main/schemas/2023/08/resource/manifest.schema.json" } } -} +} diff --git a/schemas/2023/08/resource/manifest.provider.json b/schemas/2023/08/resource/manifest.provider.json index efbcbcf3..f5623d68 100644 --- a/schemas/2023/08/resource/manifest.provider.json +++ b/schemas/2023/08/resource/manifest.provider.json @@ -1,8 +1,8 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/resource/manifest.provider.json", - "title": "Provider", - "description": "Defines the DSC Resource as a DSC Resource Provider. A DSC Resource Provider enables users to manage resources that don't have their own manifests with DSC.", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/resource/manifest.adapter.json", + "title": "Adapter", + "description": "Defines the DSC Resource as a DSC Resource Adapter. A DSC Resource Adapter enables users to manage resources that don't have their own manifests with DSC.", "type": "object", "required": [ "list", @@ -11,7 +11,7 @@ "properties": { "list": { "title": "List Command", - "description": "Defines how DSC must call the DSC Resource Provider to list its supported DSC Resources.", + "description": "Defines how DSC must call the DSC Resource Adapter to list its supported DSC Resources.", "type": "object", "required": [ "executable" @@ -27,7 +27,7 @@ }, "config": { "title": "Expected Configuration", - "description": "Defines whether the provider expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", + "description": "Defines whether the adapter expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", "type": "string", "enum": [ "full", @@ -50,4 +50,4 @@ } } ] -} +} diff --git a/schemas/2023/10/bundled/outputs/resource/list.json b/schemas/2023/10/bundled/outputs/resource/list.json index b6eda8c3..33d91835 100644 --- a/schemas/2023/10/bundled/outputs/resource/list.json +++ b/schemas/2023/10/bundled/outputs/resource/list.json @@ -73,8 +73,8 @@ } }, "requires": { - "title": "Required DSC Resource Provider", - "description": "Defines the fully qualified type name of the DSC Resource Provider the DSC Resource depends on.", + "title": "Required DSC Resource Adapter", + "description": "Defines the fully qualified type name of the DSC Resource Adapter the DSC Resource depends on.", "oneOf": [ { "$ref": "/PowerShell/DSC/main/schemas/2023/10/definitions/resourceType.json" @@ -171,8 +171,8 @@ "validate": { "$ref": "/PowerShell/DSC/main/schemas/2023/10/resource/manifest.validate.json" }, - "provider": { - "$ref": "/PowerShell/DSC/main/schemas/2023/10/resource/manifest.provider.json" + "adapter": { + "$ref": "/PowerShell/DSC/main/schemas/2023/10/resource/manifest.adapter.json" }, "exitCodes": { "title": "Exit Codes", @@ -367,11 +367,11 @@ } ] }, - "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.provider.json": { + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.adapter.json": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.provider.json", - "title": "Provider", - "description": "Defines the DSC Resource as a DSC Resource Provider. A DSC Resource Provider enables users to manage resources that don't have their own manifests with DSC.", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.adapter.json", + "title": "Adapter", + "description": "Defines the DSC Resource as a DSC Resource Adapter. A DSC Resource Adapter enables users to manage resources that don't have their own manifests with DSC.", "type": "object", "required": [ "list", @@ -380,7 +380,7 @@ "properties": { "list": { "title": "List Command", - "description": "Defines how DSC must call the DSC Resource Provider to list its supported DSC Resources.", + "description": "Defines how DSC must call the DSC Resource Adapter to list its supported DSC Resources.", "type": "object", "required": [ "executable" @@ -396,7 +396,7 @@ }, "config": { "title": "Expected Configuration", - "description": "Defines whether the provider expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", + "description": "Defines whether the adapter expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", "type": "string", "enum": [ "full", @@ -702,4 +702,4 @@ "readOnly": true } } -} +} diff --git a/schemas/2023/10/bundled/resource/manifest.json b/schemas/2023/10/bundled/resource/manifest.json index 66167f0b..2f1ca4c1 100644 --- a/schemas/2023/10/bundled/resource/manifest.json +++ b/schemas/2023/10/bundled/resource/manifest.json @@ -63,8 +63,8 @@ "validate": { "$ref": "/PowerShell/DSC/main/schemas/2023/10/resource/manifest.validate.json" }, - "provider": { - "$ref": "/PowerShell/DSC/main/schemas/2023/10/resource/manifest.provider.json" + "adapter": { + "$ref": "/PowerShell/DSC/main/schemas/2023/10/resource/manifest.adapter.json" }, "exitCodes": { "title": "Exit Codes", @@ -276,11 +276,11 @@ } ] }, - "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.provider.json": { + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.adapter.json": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.provider.json", - "title": "Provider", - "description": "Defines the DSC Resource as a DSC Resource Provider. A DSC Resource Provider enables users to manage resources that don't have their own manifests with DSC.", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.adapter.json", + "title": "Adapter", + "description": "Defines the DSC Resource as a DSC Resource Adapter. A DSC Resource Adapter enables users to manage resources that don't have their own manifests with DSC.", "type": "object", "required": [ "list", @@ -289,7 +289,7 @@ "properties": { "list": { "title": "List Command", - "description": "Defines how DSC must call the DSC Resource Provider to list its supported DSC Resources.", + "description": "Defines how DSC must call the DSC Resource Adapter to list its supported DSC Resources.", "type": "object", "required": [ "executable" @@ -305,7 +305,7 @@ }, "config": { "title": "Expected Configuration", - "description": "Defines whether the provider expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", + "description": "Defines whether the adapter expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", "type": "string", "enum": [ "full", @@ -611,4 +611,4 @@ "readOnly": true } } -} +} diff --git a/schemas/2023/10/bundled/resource/manifest.vscode.json b/schemas/2023/10/bundled/resource/manifest.vscode.json index 075213e7..2361b5d4 100644 --- a/schemas/2023/10/bundled/resource/manifest.vscode.json +++ b/schemas/2023/10/bundled/resource/manifest.vscode.json @@ -100,8 +100,8 @@ } }, { - "label": " Define a resource (provider)", - "markdownDescription": "Defines a provider resource that enables users to define non-command-based DSC Resources in\nthe configuration.", + "label": " Define a resource (adapter)", + "markdownDescription": "Defines a adapter resource that enables users to define non-command-based DSC Resources in\nthe configuration.", "body": { "$schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/bundled/resource/manifest.json", "type": "${1:owner.area.group}/${2:${TM_FILENAME_BASE/^(.*?)[\\.]dsc[\\.]resource/$1/}}", @@ -131,7 +131,7 @@ "implementsPretest": "^${16:false}", "return": "${17:state}" }, - "provider": { + "adapter": { "config": "${18|full,sequence|}", "list": { "executable": "${19:executable name}", @@ -267,8 +267,8 @@ "validate": { "$ref": "#/$defs/PowerShell/DSC/main/schemas/2023/10/resource/manifest.validate.json" }, - "provider": { - "$ref": "#/$defs/PowerShell/DSC/main/schemas/2023/10/resource/manifest.provider.json" + "adapter": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/2023/10/resource/manifest.adapter.json" }, "exitCodes": { "title": "Exit Codes", @@ -685,12 +685,12 @@ } ] }, - "manifest.provider.json": { + "manifest.adapter.json": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.provider.json", - "title": "Provider", - "description": "Defines the DSC Resource as a DSC Resource Provider. A DSC Resource Provider enables users to manage resources that don't have their own manifests with DSC.", - "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the DSC Resource as a DSC Resource Provider. A DSC Resource Provider enables users to\nmanage resources that don't have their own manifests with DSC.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/provider?view=dsc-3.0&preserve-view=true\n", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.adapter.json", + "title": "Adapter", + "description": "Defines the DSC Resource as a DSC Resource Adapter. A DSC Resource Adapter enables users to manage resources that don't have their own manifests with DSC.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the DSC Resource as a DSC Resource Adapter. A DSC Resource Adapter enables users to\nmanage resources that don't have their own manifests with DSC.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true\n", "type": "object", "required": [ "list", @@ -699,8 +699,8 @@ "properties": { "list": { "title": "List Command", - "description": "Defines how DSC must call the DSC Resource Provider to list its supported DSC Resources.", - "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC must call the DSC Resource Provider to list its supported DSC Resources.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/provider?view=dsc-3.0&preserve-view=true#list\n", + "description": "Defines how DSC must call the DSC Resource Adapter to list its supported DSC Resources.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC must call the DSC Resource Adapter to list its supported DSC Resources.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#list\n", "type": "object", "required": [ "executable" @@ -708,26 +708,26 @@ "properties": { "executable": { "$ref": "#/$defs/PowerShell/DSC/main/schemas/2023/10/definitions/commandExecutable.json", - "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/provider?view=dsc-3.0&preserve-view=true#executable\n" + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#executable\n" }, "args": { "$ref": "#/$defs/PowerShell/DSC/main/schemas/2023/10/definitions/commandArgs.json", - "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"registry\",\n \"args\": [\"resources\", \"list\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nregistry resources list\n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/provider?view=dsc-3.0&preserve-view=true#args\n" + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"registry\",\n \"args\": [\"resources\", \"list\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nregistry resources list\n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#args\n" } } }, "config": { "title": "Expected Configuration", - "description": "Defines whether the provider expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", + "description": "Defines whether the adapter expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", "type": "string", "enum": [ "full", "sequence" ], - "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the provider expects to receive a full and unprocessed configuration as a\nsingle JSON blob over stdin or a sequence of JSON Lines for each child resource's\nconfigurations.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/provider?view=dsc-3.0&preserve-view=true#config\n", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the adapter expects to receive a full and unprocessed configuration as a\nsingle JSON blob over stdin or a sequence of JSON Lines for each child resource's\nconfigurations.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#config\n", "markdownEnumDescriptions": [ - "_Full and unprocessed config as a JSON blob_\n\n> Indicates that the provider expects a JSON blob containing the full and unprocessed\n> configuration as a single JSON blob over `stdin`.\n", - "_Resource instances as JSON Lines_\n\n> Indicates that the provider expects each resource's configuration as a [JSON Line][01]\n> over `stdin`.\n\n[01]: https://jsonlines.org/\n" + "_Full and unprocessed config as a JSON blob_\n\n> Indicates that the adapter expects a JSON blob containing the full and unprocessed\n> configuration as a single JSON blob over `stdin`.\n", + "_Resource instances as JSON Lines_\n\n> Indicates that the adapter expects each resource's configuration as a [JSON Line][01]\n> over `stdin`.\n\n[01]: https://jsonlines.org/\n" ] } }, @@ -749,7 +749,7 @@ "defaultSnippets": [ { "label": " Define without arguments", - "markdownDescription": "Define the provider config kind and `list` command for the resource when no arguments are\nrequired.\n", + "markdownDescription": "Define the adapter config kind and `list` command for the resource when no arguments are\nrequired.\n", "body": { "config": "$1", "list": { @@ -759,7 +759,7 @@ }, { "label": " Define with arguments", - "markdownDescription": "Define the provider config kind and `list` command for the resource when at least one\nargument is required.\n", + "markdownDescription": "Define the adapter config kind and `list` command for the resource when at least one\nargument is required.\n", "body": { "config": "$1", "list": { @@ -1164,4 +1164,4 @@ } } } -} +} diff --git a/schemas/2023/10/outputs/resource/list.json b/schemas/2023/10/outputs/resource/list.json index cd4f6f6e..f83c459d 100644 --- a/schemas/2023/10/outputs/resource/list.json +++ b/schemas/2023/10/outputs/resource/list.json @@ -73,8 +73,8 @@ } }, "requires": { - "title": "Required DSC Resource Provider", - "description": "Defines the fully qualified type name of the DSC Resource Provider the DSC Resource depends on.", + "title": "Required DSC Resource Adapter", + "description": "Defines the fully qualified type name of the DSC Resource Adapter the DSC Resource depends on.", "oneOf": [ { "$ref": "/PowerShell/DSC/main/schemas/2023/10/definitions/resourceType.json" @@ -88,4 +88,4 @@ "$ref": "/PowerShell/DSC/main/schemas/2023/10/resource/manifest.json" } } -} +} diff --git a/schemas/2023/10/resource/manifest.json b/schemas/2023/10/resource/manifest.json index fe3361ab..6b5ba718 100644 --- a/schemas/2023/10/resource/manifest.json +++ b/schemas/2023/10/resource/manifest.json @@ -63,8 +63,8 @@ "validate": { "$ref": "/PowerShell/DSC/main/schemas/2023/10/resource/manifest.validate.json" }, - "provider": { - "$ref": "/PowerShell/DSC/main/schemas/2023/10/resource/manifest.provider.json" + "adapter": { + "$ref": "/PowerShell/DSC/main/schemas/2023/10/resource/manifest.adapter.json" }, "exitCodes": { "title": "Exit Codes", @@ -97,4 +97,4 @@ "$ref": "/PowerShell/DSC/main/schemas/2023/10/resource/manifest.schema.json" } } -} +} diff --git a/schemas/2023/10/resource/manifest.provider.json b/schemas/2023/10/resource/manifest.provider.json index 48abdd9e..76f034fd 100644 --- a/schemas/2023/10/resource/manifest.provider.json +++ b/schemas/2023/10/resource/manifest.provider.json @@ -1,8 +1,8 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.provider.json", - "title": "Provider", - "description": "Defines the DSC Resource as a DSC Resource Provider. A DSC Resource Provider enables users to manage resources that don't have their own manifests with DSC.", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.adapter.json", + "title": "Adapter", + "description": "Defines the DSC Resource as a DSC Resource Adapter. A DSC Resource Adapter enables users to manage resources that don't have their own manifests with DSC.", "type": "object", "required": [ "list", @@ -11,7 +11,7 @@ "properties": { "list": { "title": "List Command", - "description": "Defines how DSC must call the DSC Resource Provider to list its supported DSC Resources.", + "description": "Defines how DSC must call the DSC Resource Adapter to list its supported DSC Resources.", "type": "object", "required": [ "executable" @@ -27,7 +27,7 @@ }, "config": { "title": "Expected Configuration", - "description": "Defines whether the provider expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", + "description": "Defines whether the adapter expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", "type": "string", "enum": [ "full", @@ -50,4 +50,4 @@ } } ] -} +} diff --git a/schemas/src/outputs/resource/list.yaml b/schemas/src/outputs/resource/list.yaml index f6a09bc9..770c402e 100644 --- a/schemas/src/outputs/resource/list.yaml +++ b/schemas/src/outputs/resource/list.yaml @@ -49,7 +49,7 @@ properties: type: string enum: - Command - + # Need to understand how this works to document it more usefully - title: Custom implementation description: >- @@ -82,9 +82,9 @@ properties: type: string pattern: ^\w+$ requires: - title: Required DSC Resource Provider + title: Required DSC Resource Adapter description: >- - Defines the fully qualified type name of the DSC Resource Provider the + Defines the fully qualified type name of the DSC Resource Adapter the DSC Resource depends on. oneOf: - $ref: ///definitions/resourceType.yaml diff --git a/schemas/src/resource/manifest.provider.yaml b/schemas/src/resource/manifest.provider.yaml index f1c704f0..39cf0f93 100644 --- a/schemas/src/resource/manifest.provider.yaml +++ b/schemas/src/resource/manifest.provider.yaml @@ -1,20 +1,20 @@ # yaml-language-server: $schema=https://json-schema.org/draft/2020-12/schema $schema: https://json-schema.org/draft/2020-12/schema -$id: ///resource/manifest.provider.yaml +$id: ///resource/manifest.adapter.yaml -title: Provider +title: Adapter description: >- - Defines the DSC Resource as a DSC Resource Provider. A DSC Resource Provider enables users to + Defines the DSC Resource as a DSC Resource Adapter. A DSC Resource Adapter enables users to manage resources that don't have their own manifests with DSC. markdownDescription: | # VS Code only *** [_Online Documentation_][01] *** - Defines the DSC Resource as a DSC Resource Provider. A DSC Resource Provider enables users to + Defines the DSC Resource as a DSC Resource Adapter. A DSC Resource Adapter enables users to manage resources that don't have their own manifests with DSC. - [01]: /reference/schemas/resource/manifest/provider? + [01]: /reference/schemas/resource/manifest/adapter? type: object required: @@ -24,15 +24,15 @@ properties: list: title: List Command description: >- - Defines how DSC must call the DSC Resource Provider to list its supported DSC Resources. + Defines how DSC must call the DSC Resource Adapter to list its supported DSC Resources. markdownDescription: | # VS Code only *** [_Online Documentation_][01] *** - Defines how DSC must call the DSC Resource Provider to list its supported DSC Resources. + Defines how DSC must call the DSC Resource Adapter to list its supported DSC Resources. - [01]: /reference/schemas/resource/manifest/provider?#list + [01]: /reference/schemas/resource/manifest/adapter?#list type: object required: - executable @@ -49,7 +49,7 @@ properties: is only required when the command isn't recognizable by the operating system as an executable. - [01]: /reference/schemas/resource/manifest/provider?#executable + [01]: /reference/schemas/resource/manifest/adapter?#executable args: $ref: ///definitions/commandArgs.yaml markdownDescription: | @@ -75,11 +75,11 @@ properties: registry resources list ``` - [01]: /reference/schemas/resource/manifest/provider?#args + [01]: /reference/schemas/resource/manifest/adapter?#args config: title: Expected Configuration description: >- - Defines whether the provider expects to receive a full and unprocessed configuration as a + Defines whether the adapter expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations. type: string @@ -92,21 +92,21 @@ properties: [_Online Documentation_][01] *** - Defines whether the provider expects to receive a full and unprocessed configuration as a + Defines whether the adapter expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations. - [01]: /reference/schemas/resource/manifest/provider?#config + [01]: /reference/schemas/resource/manifest/adapter?#config markdownEnumDescriptions: - | # full _Full and unprocessed config as a JSON blob_ - > Indicates that the provider expects a JSON blob containing the full and unprocessed + > Indicates that the adapter expects a JSON blob containing the full and unprocessed > configuration as a single JSON blob over `stdin`. - | # sequence _Resource instances as JSON Lines_ - > Indicates that the provider expects each resource's configuration as a [JSON Line][01] + > Indicates that the adapter expects each resource's configuration as a [JSON Line][01] > over `stdin`. [01]: https://jsonlines.org/ @@ -125,7 +125,7 @@ examples: defaultSnippets: # VS Code only - label: ' Define without arguments' markdownDescription: | - Define the provider config kind and `list` command for the resource when no arguments are + Define the adapter config kind and `list` command for the resource when no arguments are required. body: config: $1 @@ -134,7 +134,7 @@ defaultSnippets: # VS Code only - label: ' Define with arguments' markdownDescription: | - Define the provider config kind and `list` command for the resource when at least one + Define the adapter config kind and `list` command for the resource when at least one argument is required. body: config: $1 diff --git a/schemas/src/resource/manifest.yaml b/schemas/src/resource/manifest.yaml index 5aaedf32..637b6ded 100644 --- a/schemas/src/resource/manifest.yaml +++ b/schemas/src/resource/manifest.yaml @@ -93,9 +93,9 @@ defaultSnippets: description: ${23:explanation of property purpose and usage} type: ${24|string,integer,number,array,object,null|} - - label: ' Define a resource (provider)' + - label: ' Define a resource (adapter)' markdownDescription: |- - Defines a provider resource that enables users to define non-command-based DSC Resources in + Defines an adapter resource that enables users to define non-command-based DSC Resources in the configuration. body: $schema: ///bundled/resource/manifest.yaml @@ -117,7 +117,7 @@ defaultSnippets: input: ${15:stdin} implementsPretest: ^${16:false} return: ${17:state} - provider: + adapter: config: ${18|full,sequence|} list: executable: ${19:executable name} @@ -191,23 +191,23 @@ properties: This property must be one of the canonical URLs for the version of the Command-based DSC Resource Manifest schema that the manifest is implemented for. - + For every version of the schema, there are three valid urls: ```yaml .../resource/manifest.json ``` - + > The URL to the canonical non-bundled schema. When it's used for validation, the validating > client needs to retrieve this schema and every schema it references. ```yaml .../bundled/resource/manifest.json ``` - + > The URL to the bundled schema. When it's used for validation, the validating client only > needs to retrieve this schema. - > + > > This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can > still validate the document when it uses this schema, other tools may error or behave > in unexpected ways. @@ -215,11 +215,11 @@ properties: ```yaml .../bundled/resource/manifest.vscode.json ``` - + > The URL to the enhanced authoring schema. This schema is much larger than the other > schemas, as it includes additional definitions that provide contextual help and snippets > that the others don't include. - > + > > This schema uses keywords that are only recognized by VS Code. While DSC can still > validate the document when it uses this schema, other tools may error or behave in > unexpected ways. @@ -266,8 +266,8 @@ properties: > > Indicates that the resource manifest adheres to the `2023/08` schema. This version > is deprecated, and should only be used for compatibility with `alpha.3` and earlier. - > Migrate to using the `` of the schema - + > Migrate to using the `` of the schema + > This URL points to the canonical non-bundled schema. When it's used for validation, the > validating client needs to retrieve this schema and every schema it references. @@ -373,8 +373,8 @@ properties: $ref: ///resource/manifest.test.yaml validate: $ref: ///resource/manifest.validate.yaml - provider: - $ref: ///resource/manifest.provider.yaml + adapter: + $ref: ///resource/manifest.adapter.yaml exitCodes: # This setting in the root of the schema implies exit codes must have the # same meaning across all executions. What about implementations that diff --git a/tools/test_group_resource/src/main.rs b/tools/test_group_resource/src/main.rs index 44c742a1..cb6555d6 100644 --- a/tools/test_group_resource/src/main.rs +++ b/tools/test_group_resource/src/main.rs @@ -37,7 +37,7 @@ fn main() { test: None, export: None, validate: None, - provider: None, + adapter: None, exit_codes: None, schema: None, }).unwrap()), @@ -67,7 +67,7 @@ fn main() { test: None, export: None, validate: None, - provider: None, + adapter: None, exit_codes: None, schema: None, }).unwrap()), diff --git a/tools/test_group_resource/testGroup.dsc.resource.json b/tools/test_group_resource/testGroup.dsc.resource.json index e674bb46..4f82e27e 100644 --- a/tools/test_group_resource/testGroup.dsc.resource.json +++ b/tools/test_group_resource/testGroup.dsc.resource.json @@ -16,7 +16,7 @@ ] } }, - "provider": { + "adapter": { "list": { "executable": "test_group_resource", "args": [ diff --git a/tools/test_group_resource/tests/provider.tests.ps1 b/tools/test_group_resource/tests/provider.tests.ps1 index bfcd0785..c977b7f9 100644 --- a/tools/test_group_resource/tests/provider.tests.ps1 +++ b/tools/test_group_resource/tests/provider.tests.ps1 @@ -1,9 +1,9 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. -Describe 'Resource provider tests' { +Describe 'Resource adapter tests' { - It 'Can list provider resources' { + It 'Can list adapter resources' { $out = dsc resource list *testresource* | ConvertFrom-Json | Sort-Object -Property type $out.Count | Should -Be 2 @@ -19,7 +19,7 @@ Describe 'Resource provider tests' { $out[1].requires | Should -BeExactly 'Test/TestGroup' } - It 'Error if provider resource is missing "requires" member' { + It 'Error if adapter resource is missing "requires" member' { $invalid_manifest = @' { "$schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/bundled/resource/manifest.json", @@ -39,7 +39,7 @@ Describe 'Resource provider tests' { ] } }, - "provider": { + "adapter": { "list": { "executable": "test_group_resource", "args": [ diff --git a/wmigroup/wmigroup.dsc.resource.json.optout b/wmigroup/wmigroup.dsc.resource.json.optout index 049c2f6f..90fa32a3 100644 --- a/wmigroup/wmigroup.dsc.resource.json.optout +++ b/wmigroup/wmigroup.dsc.resource.json.optout @@ -2,11 +2,11 @@ "$schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/bundled/resource/manifest.json", "type": "DSC/WMIGroup", "version": "0.1.0", - "description": "Resource provider to WMI resources.", + "description": "Resource adapter to WMI resources.", "tags": [ "PowerShell" ], - "provider": { + "adapter": { "list": { "executable": "powershell", "args": [ @@ -39,7 +39,7 @@ "-Command", "$Input | ./wmigroup.resource.ps1 Validate" ] - }, + }, "exitCodes": { "0": "Success", "1": "Error" From 17ce5dfcb6dd475742a55a5626aa0d79ef87f506 Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Thu, 29 Feb 2024 08:13:13 -0800 Subject: [PATCH 2/4] revert changes to schemas and docs folders --- docs/reference/cli/resource/list.md | 10 ++--- .../schemas/config/functions/resourceId.md | 4 +- docs/reference/schemas/config/resource.md | 6 +-- .../schemas/outputs/resource/list.md | 12 +++--- .../schemas/resource/manifest/provider.md | 34 +++++++-------- .../schemas/resource/manifest/root.md | 12 +++--- .../08/bundled/outputs/resource/list.json | 22 +++++----- .../2023/08/bundled/resource/manifest.json | 18 ++++---- .../08/bundled/resource/manifest.vscode.json | 42 +++++++++---------- schemas/2023/08/outputs/resource/list.json | 6 +-- schemas/2023/08/resource/manifest.json | 6 +-- .../2023/08/resource/manifest.provider.json | 12 +++--- .../10/bundled/outputs/resource/list.json | 22 +++++----- .../2023/10/bundled/resource/manifest.json | 18 ++++---- .../10/bundled/resource/manifest.vscode.json | 42 +++++++++---------- schemas/2023/10/outputs/resource/list.json | 6 +-- schemas/2023/10/resource/manifest.json | 6 +-- .../2023/10/resource/manifest.provider.json | 12 +++--- schemas/src/outputs/resource/list.yaml | 6 +-- schemas/src/resource/manifest.provider.yaml | 34 +++++++-------- schemas/src/resource/manifest.yaml | 26 ++++++------ 21 files changed, 178 insertions(+), 178 deletions(-) diff --git a/docs/reference/cli/resource/list.md b/docs/reference/cli/resource/list.md index 60fdeda2..30505139 100644 --- a/docs/reference/cli/resource/list.md +++ b/docs/reference/cli/resource/list.md @@ -24,7 +24,7 @@ discovers resources by first searching the `PATH` or `DSC_RESOURCE_PATH` environ `.dsc.resource.json`, `.dsc.resource.yml`, and `dsc.resource.yaml` files. For more information about the environment variables DSC uses, see [Environment variables][01] -If any of the discovered resources are resource adapters, DSC then calls the adapters to list +If any of the discovered resources are resource providers, DSC then calls the providers to list their resources, too. DSC returns the list of discovered resources with their implementation information and metadata. If @@ -47,9 +47,9 @@ type version tags description ---- ------- ---- ----------- Test/TestGroup 0.1.0 Microsoft/OSInfo 0.1.0 {os, linux, windows, macos} Returns information about the operating system. -Microsoft.Windows/Registry 0.1.0 {Windows, NT} Registry configuration adapter for the Windows Registry +Microsoft.Windows/Registry 0.1.0 {Windows, NT} Registry configuration provider for the Windows Registry This is a test resource. -DSC/PowerShellGroup 0.1.0 {PowerShell} Resource adapter to classic DSC Powershell resources. +DSC/PowerShellGroup 0.1.0 {PowerShell} Resource provider to classic DSC Powershell resources. DSC/AssertionGroup 0.1.0 `test` will be invoked for all resources in the supplied configuration. DSC/ParallelGroup 0.1.0 All resources in the supplied configuration run concurrently. This is a test resource. @@ -85,7 +85,7 @@ Type Version Requires Description --------------------------------------------------------------------------------------------------------------- DSC/Group 0.1.0 All resources in the supplied configuration is treated as a group. DSC/ParallelGroup 0.1.0 All resources in the supplied configuration run concurrently. -DSC/PowerShellGroup 0.1.0 Resource adapter to classic DSC Powershell resources. +DSC/PowerShellGroup 0.1.0 Resource provider to classic DSC Powershell resources. DSC/AssertionGroup 0.1.0 `test` will be invoked for all resources in the supplied configuration. ``` @@ -118,7 +118,7 @@ dsc resource list --tags Windows --tags Linux ```output Type Version Requires Description ------------------------------------------------------------------------------------------------------- -Microsoft.Windows/Registry 0.1.0 Registry configuration adapter for the Windows Registry +Microsoft.Windows/Registry 0.1.0 Registry configuration provider for the Windows Registry Microsoft/OSInfo 0.1.0 Returns information about the operating system. ``` diff --git a/docs/reference/schemas/config/functions/resourceId.md b/docs/reference/schemas/config/functions/resourceId.md index 44fe8672..3e16fa76 100644 --- a/docs/reference/schemas/config/functions/resourceId.md +++ b/docs/reference/schemas/config/functions/resourceId.md @@ -24,9 +24,9 @@ This function enables instances to reference another instance for the [dependsOn > [!NOTE] > When using the `resourceId` function for [nested resource instances][02], instances can only -> reference other instances in the same resource adapter or group instance. They can't use the +> reference other instances in the same resource provider or group instance. They can't use the > `resourceId()` function to lookup instances at the top-level of the configuration document or -> inside another adapter or group instance. +> inside another provider or group instance. ## Examples diff --git a/docs/reference/schemas/config/resource.md b/docs/reference/schemas/config/resource.md index 0d10bb5b..cf010204 100644 --- a/docs/reference/schemas/config/resource.md +++ b/docs/reference/schemas/config/resource.md @@ -122,12 +122,12 @@ resource named `Tailspin Key`: > [!NOTE] > When defining dependencies for [nested resource instances][03], instances can only reference -> dependencies in the same resource adapter or group instance. They can't use the `resourceId()` +> dependencies in the same resource provider or group instance. They can't use the `resourceId()` > function to lookup instances at the top-level of the configuration document or inside another -> adapter or group instance. +> provider or group instance. > > If a top-level instance depends on a nested instance, use the `resourceId()` function to lookup -> the instance of the adapter or group containing the dependency instance instead. +> the instance of the provider or group containing the dependency instance instead. For more information about using functions in configuration documents, see [DSC Configuration document functions reference][04]. For more information about the `resourceId()` diff --git a/docs/reference/schemas/outputs/resource/list.md b/docs/reference/schemas/outputs/resource/list.md index e99e1838..984b9935 100644 --- a/docs/reference/schemas/outputs/resource/list.md +++ b/docs/reference/schemas/outputs/resource/list.md @@ -78,7 +78,7 @@ Required: true ### path Represents the path to the resource's manifest on the machine. For resources made available through -an adapter, this property identifies the path to the file that defines the resource instead. +a provider, this property identifies the path to the file that defines the resource instead. ```yaml Type: string @@ -88,7 +88,7 @@ Required: true ### directory Represents the path to the folder containing the resource's manifest on the machine. For resources -made available through an adapter, this property identifies the path to the folder containing the +made available through a provider, this property identifies the path to the folder containing the file that defines the resource instead. ```yaml @@ -113,7 +113,7 @@ this property is `null`, the author is unknown. ```yaml @@ -123,13 +123,13 @@ Required: true ### properties -Defines the property names for resources made available through an adapter resource. For other +Defines the property names for resources made available through a provider resource. For other resources, this property is an empty array. ```yaml @@ -141,7 +141,7 @@ ItemsPattern: ^\w+$ ### requires -Defines the fully qualified type name of the adapter resource that this resource is made available +Defines the fully qualified type name of the provider resource that this resource is made available through. ```yaml diff --git a/docs/reference/schemas/resource/manifest/provider.md b/docs/reference/schemas/resource/manifest/provider.md index 307fb0cb..e3134e4c 100644 --- a/docs/reference/schemas/resource/manifest/provider.md +++ b/docs/reference/schemas/resource/manifest/provider.md @@ -1,38 +1,38 @@ --- -description: JSON schema reference for the 'adapter' property in a DSC Resource manifest +description: JSON schema reference for the 'provider' property in a DSC Resource manifest ms.date: 01/17/2024 ms.topic: reference -title: DSC Resource manifest adapter property schema reference +title: DSC Resource manifest provider property schema reference --- -# DSC Resource manifest adapter property schema reference +# DSC Resource manifest provider property schema reference ## Synopsis -Defines a DSC Resource as a DSC Resource Adapter. +Defines a DSC Resource as a DSC Resource Provider. ## Metadata ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.adapter.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.provider.json Type: object ``` ## Description -DSC Resource Adapters must define the `adapter` property in their manifest. This property -identifies the resource as an adapter and defines how DSC can call the adapter to get the -resources the adapter supports and how to pass resource instances to the adapter. +DSC Resource Providers must define the `provider` property in their manifest. This property +identifies the resource as a provider and defines how DSC can call the provider to get the +resources the provider supports and how to pass resource instances to the provider. ## Examples ### Example 1 - DSC/PowerShellGroup -This example is from the `DSC/PowerShellGroup` DSC Resource Adapter. +This example is from the `DSC/PowerShellGroup` DSC Resource Provider. ```json -"adapter": { +"provider": { "config": "full", "list": { "executable": "pwsh", @@ -47,7 +47,7 @@ This example is from the `DSC/PowerShellGroup` DSC Resource Adapter. } ``` -The manifest sets `config` to `full`, indicating that the adapter expects a JSON blob representing +The manifest sets `config` to `full`, indicating that the provider expects a JSON blob representing the full and unprocessed configuration from `stdin`. It defines `list.executable` as `pwsh`. The arguments defined in `list.args` ensure that DSC runs @@ -59,7 +59,7 @@ PowerShell: - To invoke the `powershellgroup.resource.ps1` script in the same folder as the `dsc` command and pass the `List` argument. -With this definition, DSC calls the `list` method for this adapter by running: +With this definition, DSC calls the `list` method for this provider by running: ```sh pwsh -NoLogo -NonInteractive -NoProfile -Command "./powershellgroup.resource.ps1 List" @@ -67,7 +67,7 @@ pwsh -NoLogo -NonInteractive -NoProfile -Command "./powershellgroup.resource.ps1 ## Required Properties -The `adapter` definition must include these properties: +The `provider` definition must include these properties: - [config](#config) - [list](#list) @@ -76,12 +76,12 @@ The `adapter` definition must include these properties: ### config -The `config` property defines how the adapter expects to receive resource configurations. The +The `config` property defines how the provider expects to receive resource configurations. The value must be one of the following options: -- `full` - Indicates that the adapter expects a JSON blob containing the full and +- `full` - Indicates that the provider expects a JSON blob containing the full and unprocessed configuration as a single JSON blob over `stdin`. -- `sequence` - Indicates that the adapter expects each resource's configuration as +- `sequence` - Indicates that the provider expects each resource's configuration as a [JSON Line][01] over `stdin`. ```yaml @@ -91,7 +91,7 @@ ValidValues: [full, sequence] ### list -The `list` property defines how to call the adapter to list the resources it supports. The value +The `list` property defines how to call the provider to list the resources it supports. The value of this property must be an object and define the `executable` subproperty. ```yaml diff --git a/docs/reference/schemas/resource/manifest/root.md b/docs/reference/schemas/resource/manifest/root.md index 594e6532..fc268094 100644 --- a/docs/reference/schemas/resource/manifest/root.md +++ b/docs/reference/schemas/resource/manifest/root.md @@ -215,14 +215,14 @@ Type: object Required: false ``` -### adapter +### provider -When specified, the `adapter` property defines the resource as a DSC Resource Adapter. +When specified, the `provider` property defines the resource as a DSC Resource Provider. The value of this property must be an object. The object's `list` and `config` properties are -mandatory. The `list` property defines how to call the adapter to return the resources that the -adapter can manage. The `config` property defines how the adapter expects input. For more -information, see the [DSC Resource manifest adapter property schema reference][11]. +mandatory. The `list` property defines how to call the provider to return the resources that the +provider can manage. The `config` property defines how the provider expects input. For more +information, see the [DSC Resource manifest provider property schema reference][11]. ### exitCodes @@ -268,5 +268,5 @@ Required: true [08]: set.md [09]: test.md [10]: validate.md -[11]: adapter.md +[11]: provider.md [12]: schema/property.md diff --git a/schemas/2023/08/bundled/outputs/resource/list.json b/schemas/2023/08/bundled/outputs/resource/list.json index 8665d597..5b5f4acd 100644 --- a/schemas/2023/08/bundled/outputs/resource/list.json +++ b/schemas/2023/08/bundled/outputs/resource/list.json @@ -73,8 +73,8 @@ } }, "requires": { - "title": "Required DSC Resource Adapter", - "description": "Defines the fully qualified type name of the DSC Resource Adapter the DSC Resource depends on.", + "title": "Required DSC Resource Provider", + "description": "Defines the fully qualified type name of the DSC Resource Provider the DSC Resource depends on.", "oneOf": [ { "$ref": "/PowerShell/DSC/main/schemas/2023/08/definitions/resourceType.json" @@ -166,8 +166,8 @@ "validate": { "$ref": "/PowerShell/DSC/main/schemas/2023/08/resource/manifest.validate.json" }, - "adapter": { - "$ref": "/PowerShell/DSC/main/schemas/2023/08/resource/manifest.adapter.json" + "provider": { + "$ref": "/PowerShell/DSC/main/schemas/2023/08/resource/manifest.provider.json" }, "exitCodes": { "title": "Exit Codes", @@ -362,11 +362,11 @@ } ] }, - "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/resource/manifest.adapter.json": { + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/resource/manifest.provider.json": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/resource/manifest.adapter.json", - "title": "Adapter", - "description": "Defines the DSC Resource as a DSC Resource Adapter. A DSC Resource Adapter enables users to manage resources that don't have their own manifests with DSC.", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/resource/manifest.provider.json", + "title": "Provider", + "description": "Defines the DSC Resource as a DSC Resource Provider. A DSC Resource Provider enables users to manage resources that don't have their own manifests with DSC.", "type": "object", "required": [ "list", @@ -375,7 +375,7 @@ "properties": { "list": { "title": "List Command", - "description": "Defines how DSC must call the DSC Resource Adapter to list its supported DSC Resources.", + "description": "Defines how DSC must call the DSC Resource Provider to list its supported DSC Resources.", "type": "object", "required": [ "executable" @@ -391,7 +391,7 @@ }, "config": { "title": "Expected Configuration", - "description": "Defines whether the adapter expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", + "description": "Defines whether the provider expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", "type": "string", "enum": [ "full", @@ -696,4 +696,4 @@ "readOnly": true } } -} +} diff --git a/schemas/2023/08/bundled/resource/manifest.json b/schemas/2023/08/bundled/resource/manifest.json index a385dd8b..c5d29991 100644 --- a/schemas/2023/08/bundled/resource/manifest.json +++ b/schemas/2023/08/bundled/resource/manifest.json @@ -58,8 +58,8 @@ "validate": { "$ref": "/PowerShell/DSC/main/schemas/2023/08/resource/manifest.validate.json" }, - "adapter": { - "$ref": "/PowerShell/DSC/main/schemas/2023/08/resource/manifest.adapter.json" + "provider": { + "$ref": "/PowerShell/DSC/main/schemas/2023/08/resource/manifest.provider.json" }, "exitCodes": { "title": "Exit Codes", @@ -271,11 +271,11 @@ } ] }, - "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/resource/manifest.adapter.json": { + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/resource/manifest.provider.json": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/resource/manifest.adapter.json", - "title": "Adapter", - "description": "Defines the DSC Resource as a DSC Resource Adapter. A DSC Resource Adapter enables users to manage resources that don't have their own manifests with DSC.", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/resource/manifest.provider.json", + "title": "Provider", + "description": "Defines the DSC Resource as a DSC Resource Provider. A DSC Resource Provider enables users to manage resources that don't have their own manifests with DSC.", "type": "object", "required": [ "list", @@ -284,7 +284,7 @@ "properties": { "list": { "title": "List Command", - "description": "Defines how DSC must call the DSC Resource Adapter to list its supported DSC Resources.", + "description": "Defines how DSC must call the DSC Resource Provider to list its supported DSC Resources.", "type": "object", "required": [ "executable" @@ -300,7 +300,7 @@ }, "config": { "title": "Expected Configuration", - "description": "Defines whether the adapter expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", + "description": "Defines whether the provider expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", "type": "string", "enum": [ "full", @@ -605,4 +605,4 @@ "readOnly": true } } -} +} diff --git a/schemas/2023/08/bundled/resource/manifest.vscode.json b/schemas/2023/08/bundled/resource/manifest.vscode.json index abe57b9b..9fc6ff97 100644 --- a/schemas/2023/08/bundled/resource/manifest.vscode.json +++ b/schemas/2023/08/bundled/resource/manifest.vscode.json @@ -100,8 +100,8 @@ } }, { - "label": " Define a resource (adapter)", - "markdownDescription": "Defines a adapter resource that enables users to define non-command-based DSC Resources in\nthe configuration.", + "label": " Define a resource (provider)", + "markdownDescription": "Defines a provider resource that enables users to define non-command-based DSC Resources in\nthe configuration.", "body": { "$schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/bundled/resource/manifest.json", "type": "${1:owner.area.group}/${2:${TM_FILENAME_BASE/^(.*?)[\\.]dsc[\\.]resource/$1/}}", @@ -131,7 +131,7 @@ "implementsPretest": "^${16:false}", "return": "${17:state}" }, - "adapter": { + "provider": { "config": "${18|full,sequence|}", "list": { "executable": "${19:executable name}", @@ -257,8 +257,8 @@ "validate": { "$ref": "#/$defs/PowerShell/DSC/main/schemas/2023/08/resource/manifest.validate.json" }, - "adapter": { - "$ref": "#/$defs/PowerShell/DSC/main/schemas/2023/08/resource/manifest.adapter.json" + "provider": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/2023/08/resource/manifest.provider.json" }, "exitCodes": { "title": "Exit Codes", @@ -675,12 +675,12 @@ } ] }, - "manifest.adapter.json": { + "manifest.provider.json": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/resource/manifest.adapter.json", - "title": "Adapter", - "description": "Defines the DSC Resource as a DSC Resource Adapter. A DSC Resource Adapter enables users to manage resources that don't have their own manifests with DSC.", - "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the DSC Resource as a DSC Resource Adapter. A DSC Resource Adapter enables users to\nmanage resources that don't have their own manifests with DSC.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true\n", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/resource/manifest.provider.json", + "title": "Provider", + "description": "Defines the DSC Resource as a DSC Resource Provider. A DSC Resource Provider enables users to manage resources that don't have their own manifests with DSC.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the DSC Resource as a DSC Resource Provider. A DSC Resource Provider enables users to\nmanage resources that don't have their own manifests with DSC.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/provider?view=dsc-3.0&preserve-view=true\n", "type": "object", "required": [ "list", @@ -689,8 +689,8 @@ "properties": { "list": { "title": "List Command", - "description": "Defines how DSC must call the DSC Resource Adapter to list its supported DSC Resources.", - "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC must call the DSC Resource Adapter to list its supported DSC Resources.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#list\n", + "description": "Defines how DSC must call the DSC Resource Provider to list its supported DSC Resources.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC must call the DSC Resource Provider to list its supported DSC Resources.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/provider?view=dsc-3.0&preserve-view=true#list\n", "type": "object", "required": [ "executable" @@ -698,26 +698,26 @@ "properties": { "executable": { "$ref": "#/$defs/PowerShell/DSC/main/schemas/2023/08/definitions/commandExecutable.json", - "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#executable\n" + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/provider?view=dsc-3.0&preserve-view=true#executable\n" }, "args": { "$ref": "#/$defs/PowerShell/DSC/main/schemas/2023/08/definitions/commandArgs.json", - "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"registry\",\n \"args\": [\"resources\", \"list\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nregistry resources list\n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#args\n" + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"registry\",\n \"args\": [\"resources\", \"list\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nregistry resources list\n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/provider?view=dsc-3.0&preserve-view=true#args\n" } } }, "config": { "title": "Expected Configuration", - "description": "Defines whether the adapter expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", + "description": "Defines whether the provider expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", "type": "string", "enum": [ "full", "sequence" ], - "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the adapter expects to receive a full and unprocessed configuration as a\nsingle JSON blob over stdin or a sequence of JSON Lines for each child resource's\nconfigurations.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#config\n", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the provider expects to receive a full and unprocessed configuration as a\nsingle JSON blob over stdin or a sequence of JSON Lines for each child resource's\nconfigurations.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/provider?view=dsc-3.0&preserve-view=true#config\n", "markdownEnumDescriptions": [ - "_Full and unprocessed config as a JSON blob_\n\n> Indicates that the adapter expects a JSON blob containing the full and unprocessed\n> configuration as a single JSON blob over `stdin`.\n", - "_Resource instances as JSON Lines_\n\n> Indicates that the adapter expects each resource's configuration as a [JSON Line][01]\n> over `stdin`.\n\n[01]: https://jsonlines.org/\n" + "_Full and unprocessed config as a JSON blob_\n\n> Indicates that the provider expects a JSON blob containing the full and unprocessed\n> configuration as a single JSON blob over `stdin`.\n", + "_Resource instances as JSON Lines_\n\n> Indicates that the provider expects each resource's configuration as a [JSON Line][01]\n> over `stdin`.\n\n[01]: https://jsonlines.org/\n" ] } }, @@ -739,7 +739,7 @@ "defaultSnippets": [ { "label": " Define without arguments", - "markdownDescription": "Define the adapter config kind and `list` command for the resource when no arguments are\nrequired.\n", + "markdownDescription": "Define the provider config kind and `list` command for the resource when no arguments are\nrequired.\n", "body": { "config": "$1", "list": { @@ -749,7 +749,7 @@ }, { "label": " Define with arguments", - "markdownDescription": "Define the adapter config kind and `list` command for the resource when at least one\nargument is required.\n", + "markdownDescription": "Define the provider config kind and `list` command for the resource when at least one\nargument is required.\n", "body": { "config": "$1", "list": { @@ -1154,4 +1154,4 @@ } } } -} +} diff --git a/schemas/2023/08/outputs/resource/list.json b/schemas/2023/08/outputs/resource/list.json index 5698890c..13b4a509 100644 --- a/schemas/2023/08/outputs/resource/list.json +++ b/schemas/2023/08/outputs/resource/list.json @@ -73,8 +73,8 @@ } }, "requires": { - "title": "Required DSC Resource Adapter", - "description": "Defines the fully qualified type name of the DSC Resource Adapter the DSC Resource depends on.", + "title": "Required DSC Resource Provider", + "description": "Defines the fully qualified type name of the DSC Resource Provider the DSC Resource depends on.", "oneOf": [ { "$ref": "/PowerShell/DSC/main/schemas/2023/08/definitions/resourceType.json" @@ -88,4 +88,4 @@ "$ref": "/PowerShell/DSC/main/schemas/2023/08/resource/manifest.json" } } -} +} diff --git a/schemas/2023/08/resource/manifest.json b/schemas/2023/08/resource/manifest.json index 2046f14c..25efc748 100644 --- a/schemas/2023/08/resource/manifest.json +++ b/schemas/2023/08/resource/manifest.json @@ -58,8 +58,8 @@ "validate": { "$ref": "/PowerShell/DSC/main/schemas/2023/08/resource/manifest.validate.json" }, - "adapter": { - "$ref": "/PowerShell/DSC/main/schemas/2023/08/resource/manifest.adapter.json" + "provider": { + "$ref": "/PowerShell/DSC/main/schemas/2023/08/resource/manifest.provider.json" }, "exitCodes": { "title": "Exit Codes", @@ -92,4 +92,4 @@ "$ref": "/PowerShell/DSC/main/schemas/2023/08/resource/manifest.schema.json" } } -} +} diff --git a/schemas/2023/08/resource/manifest.provider.json b/schemas/2023/08/resource/manifest.provider.json index f5623d68..efbcbcf3 100644 --- a/schemas/2023/08/resource/manifest.provider.json +++ b/schemas/2023/08/resource/manifest.provider.json @@ -1,8 +1,8 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/resource/manifest.adapter.json", - "title": "Adapter", - "description": "Defines the DSC Resource as a DSC Resource Adapter. A DSC Resource Adapter enables users to manage resources that don't have their own manifests with DSC.", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/resource/manifest.provider.json", + "title": "Provider", + "description": "Defines the DSC Resource as a DSC Resource Provider. A DSC Resource Provider enables users to manage resources that don't have their own manifests with DSC.", "type": "object", "required": [ "list", @@ -11,7 +11,7 @@ "properties": { "list": { "title": "List Command", - "description": "Defines how DSC must call the DSC Resource Adapter to list its supported DSC Resources.", + "description": "Defines how DSC must call the DSC Resource Provider to list its supported DSC Resources.", "type": "object", "required": [ "executable" @@ -27,7 +27,7 @@ }, "config": { "title": "Expected Configuration", - "description": "Defines whether the adapter expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", + "description": "Defines whether the provider expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", "type": "string", "enum": [ "full", @@ -50,4 +50,4 @@ } } ] -} +} diff --git a/schemas/2023/10/bundled/outputs/resource/list.json b/schemas/2023/10/bundled/outputs/resource/list.json index 33d91835..b6eda8c3 100644 --- a/schemas/2023/10/bundled/outputs/resource/list.json +++ b/schemas/2023/10/bundled/outputs/resource/list.json @@ -73,8 +73,8 @@ } }, "requires": { - "title": "Required DSC Resource Adapter", - "description": "Defines the fully qualified type name of the DSC Resource Adapter the DSC Resource depends on.", + "title": "Required DSC Resource Provider", + "description": "Defines the fully qualified type name of the DSC Resource Provider the DSC Resource depends on.", "oneOf": [ { "$ref": "/PowerShell/DSC/main/schemas/2023/10/definitions/resourceType.json" @@ -171,8 +171,8 @@ "validate": { "$ref": "/PowerShell/DSC/main/schemas/2023/10/resource/manifest.validate.json" }, - "adapter": { - "$ref": "/PowerShell/DSC/main/schemas/2023/10/resource/manifest.adapter.json" + "provider": { + "$ref": "/PowerShell/DSC/main/schemas/2023/10/resource/manifest.provider.json" }, "exitCodes": { "title": "Exit Codes", @@ -367,11 +367,11 @@ } ] }, - "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.adapter.json": { + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.provider.json": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.adapter.json", - "title": "Adapter", - "description": "Defines the DSC Resource as a DSC Resource Adapter. A DSC Resource Adapter enables users to manage resources that don't have their own manifests with DSC.", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.provider.json", + "title": "Provider", + "description": "Defines the DSC Resource as a DSC Resource Provider. A DSC Resource Provider enables users to manage resources that don't have their own manifests with DSC.", "type": "object", "required": [ "list", @@ -380,7 +380,7 @@ "properties": { "list": { "title": "List Command", - "description": "Defines how DSC must call the DSC Resource Adapter to list its supported DSC Resources.", + "description": "Defines how DSC must call the DSC Resource Provider to list its supported DSC Resources.", "type": "object", "required": [ "executable" @@ -396,7 +396,7 @@ }, "config": { "title": "Expected Configuration", - "description": "Defines whether the adapter expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", + "description": "Defines whether the provider expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", "type": "string", "enum": [ "full", @@ -702,4 +702,4 @@ "readOnly": true } } -} +} diff --git a/schemas/2023/10/bundled/resource/manifest.json b/schemas/2023/10/bundled/resource/manifest.json index 2f1ca4c1..66167f0b 100644 --- a/schemas/2023/10/bundled/resource/manifest.json +++ b/schemas/2023/10/bundled/resource/manifest.json @@ -63,8 +63,8 @@ "validate": { "$ref": "/PowerShell/DSC/main/schemas/2023/10/resource/manifest.validate.json" }, - "adapter": { - "$ref": "/PowerShell/DSC/main/schemas/2023/10/resource/manifest.adapter.json" + "provider": { + "$ref": "/PowerShell/DSC/main/schemas/2023/10/resource/manifest.provider.json" }, "exitCodes": { "title": "Exit Codes", @@ -276,11 +276,11 @@ } ] }, - "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.adapter.json": { + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.provider.json": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.adapter.json", - "title": "Adapter", - "description": "Defines the DSC Resource as a DSC Resource Adapter. A DSC Resource Adapter enables users to manage resources that don't have their own manifests with DSC.", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.provider.json", + "title": "Provider", + "description": "Defines the DSC Resource as a DSC Resource Provider. A DSC Resource Provider enables users to manage resources that don't have their own manifests with DSC.", "type": "object", "required": [ "list", @@ -289,7 +289,7 @@ "properties": { "list": { "title": "List Command", - "description": "Defines how DSC must call the DSC Resource Adapter to list its supported DSC Resources.", + "description": "Defines how DSC must call the DSC Resource Provider to list its supported DSC Resources.", "type": "object", "required": [ "executable" @@ -305,7 +305,7 @@ }, "config": { "title": "Expected Configuration", - "description": "Defines whether the adapter expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", + "description": "Defines whether the provider expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", "type": "string", "enum": [ "full", @@ -611,4 +611,4 @@ "readOnly": true } } -} +} diff --git a/schemas/2023/10/bundled/resource/manifest.vscode.json b/schemas/2023/10/bundled/resource/manifest.vscode.json index 2361b5d4..075213e7 100644 --- a/schemas/2023/10/bundled/resource/manifest.vscode.json +++ b/schemas/2023/10/bundled/resource/manifest.vscode.json @@ -100,8 +100,8 @@ } }, { - "label": " Define a resource (adapter)", - "markdownDescription": "Defines a adapter resource that enables users to define non-command-based DSC Resources in\nthe configuration.", + "label": " Define a resource (provider)", + "markdownDescription": "Defines a provider resource that enables users to define non-command-based DSC Resources in\nthe configuration.", "body": { "$schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/bundled/resource/manifest.json", "type": "${1:owner.area.group}/${2:${TM_FILENAME_BASE/^(.*?)[\\.]dsc[\\.]resource/$1/}}", @@ -131,7 +131,7 @@ "implementsPretest": "^${16:false}", "return": "${17:state}" }, - "adapter": { + "provider": { "config": "${18|full,sequence|}", "list": { "executable": "${19:executable name}", @@ -267,8 +267,8 @@ "validate": { "$ref": "#/$defs/PowerShell/DSC/main/schemas/2023/10/resource/manifest.validate.json" }, - "adapter": { - "$ref": "#/$defs/PowerShell/DSC/main/schemas/2023/10/resource/manifest.adapter.json" + "provider": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/2023/10/resource/manifest.provider.json" }, "exitCodes": { "title": "Exit Codes", @@ -685,12 +685,12 @@ } ] }, - "manifest.adapter.json": { + "manifest.provider.json": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.adapter.json", - "title": "Adapter", - "description": "Defines the DSC Resource as a DSC Resource Adapter. A DSC Resource Adapter enables users to manage resources that don't have their own manifests with DSC.", - "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the DSC Resource as a DSC Resource Adapter. A DSC Resource Adapter enables users to\nmanage resources that don't have their own manifests with DSC.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true\n", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.provider.json", + "title": "Provider", + "description": "Defines the DSC Resource as a DSC Resource Provider. A DSC Resource Provider enables users to manage resources that don't have their own manifests with DSC.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the DSC Resource as a DSC Resource Provider. A DSC Resource Provider enables users to\nmanage resources that don't have their own manifests with DSC.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/provider?view=dsc-3.0&preserve-view=true\n", "type": "object", "required": [ "list", @@ -699,8 +699,8 @@ "properties": { "list": { "title": "List Command", - "description": "Defines how DSC must call the DSC Resource Adapter to list its supported DSC Resources.", - "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC must call the DSC Resource Adapter to list its supported DSC Resources.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#list\n", + "description": "Defines how DSC must call the DSC Resource Provider to list its supported DSC Resources.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC must call the DSC Resource Provider to list its supported DSC Resources.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/provider?view=dsc-3.0&preserve-view=true#list\n", "type": "object", "required": [ "executable" @@ -708,26 +708,26 @@ "properties": { "executable": { "$ref": "#/$defs/PowerShell/DSC/main/schemas/2023/10/definitions/commandExecutable.json", - "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#executable\n" + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/provider?view=dsc-3.0&preserve-view=true#executable\n" }, "args": { "$ref": "#/$defs/PowerShell/DSC/main/schemas/2023/10/definitions/commandArgs.json", - "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"registry\",\n \"args\": [\"resources\", \"list\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nregistry resources list\n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#args\n" + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"registry\",\n \"args\": [\"resources\", \"list\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nregistry resources list\n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/provider?view=dsc-3.0&preserve-view=true#args\n" } } }, "config": { "title": "Expected Configuration", - "description": "Defines whether the adapter expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", + "description": "Defines whether the provider expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", "type": "string", "enum": [ "full", "sequence" ], - "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the adapter expects to receive a full and unprocessed configuration as a\nsingle JSON blob over stdin or a sequence of JSON Lines for each child resource's\nconfigurations.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#config\n", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the provider expects to receive a full and unprocessed configuration as a\nsingle JSON blob over stdin or a sequence of JSON Lines for each child resource's\nconfigurations.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/provider?view=dsc-3.0&preserve-view=true#config\n", "markdownEnumDescriptions": [ - "_Full and unprocessed config as a JSON blob_\n\n> Indicates that the adapter expects a JSON blob containing the full and unprocessed\n> configuration as a single JSON blob over `stdin`.\n", - "_Resource instances as JSON Lines_\n\n> Indicates that the adapter expects each resource's configuration as a [JSON Line][01]\n> over `stdin`.\n\n[01]: https://jsonlines.org/\n" + "_Full and unprocessed config as a JSON blob_\n\n> Indicates that the provider expects a JSON blob containing the full and unprocessed\n> configuration as a single JSON blob over `stdin`.\n", + "_Resource instances as JSON Lines_\n\n> Indicates that the provider expects each resource's configuration as a [JSON Line][01]\n> over `stdin`.\n\n[01]: https://jsonlines.org/\n" ] } }, @@ -749,7 +749,7 @@ "defaultSnippets": [ { "label": " Define without arguments", - "markdownDescription": "Define the adapter config kind and `list` command for the resource when no arguments are\nrequired.\n", + "markdownDescription": "Define the provider config kind and `list` command for the resource when no arguments are\nrequired.\n", "body": { "config": "$1", "list": { @@ -759,7 +759,7 @@ }, { "label": " Define with arguments", - "markdownDescription": "Define the adapter config kind and `list` command for the resource when at least one\nargument is required.\n", + "markdownDescription": "Define the provider config kind and `list` command for the resource when at least one\nargument is required.\n", "body": { "config": "$1", "list": { @@ -1164,4 +1164,4 @@ } } } -} +} diff --git a/schemas/2023/10/outputs/resource/list.json b/schemas/2023/10/outputs/resource/list.json index f83c459d..cd4f6f6e 100644 --- a/schemas/2023/10/outputs/resource/list.json +++ b/schemas/2023/10/outputs/resource/list.json @@ -73,8 +73,8 @@ } }, "requires": { - "title": "Required DSC Resource Adapter", - "description": "Defines the fully qualified type name of the DSC Resource Adapter the DSC Resource depends on.", + "title": "Required DSC Resource Provider", + "description": "Defines the fully qualified type name of the DSC Resource Provider the DSC Resource depends on.", "oneOf": [ { "$ref": "/PowerShell/DSC/main/schemas/2023/10/definitions/resourceType.json" @@ -88,4 +88,4 @@ "$ref": "/PowerShell/DSC/main/schemas/2023/10/resource/manifest.json" } } -} +} diff --git a/schemas/2023/10/resource/manifest.json b/schemas/2023/10/resource/manifest.json index 6b5ba718..fe3361ab 100644 --- a/schemas/2023/10/resource/manifest.json +++ b/schemas/2023/10/resource/manifest.json @@ -63,8 +63,8 @@ "validate": { "$ref": "/PowerShell/DSC/main/schemas/2023/10/resource/manifest.validate.json" }, - "adapter": { - "$ref": "/PowerShell/DSC/main/schemas/2023/10/resource/manifest.adapter.json" + "provider": { + "$ref": "/PowerShell/DSC/main/schemas/2023/10/resource/manifest.provider.json" }, "exitCodes": { "title": "Exit Codes", @@ -97,4 +97,4 @@ "$ref": "/PowerShell/DSC/main/schemas/2023/10/resource/manifest.schema.json" } } -} +} diff --git a/schemas/2023/10/resource/manifest.provider.json b/schemas/2023/10/resource/manifest.provider.json index 76f034fd..48abdd9e 100644 --- a/schemas/2023/10/resource/manifest.provider.json +++ b/schemas/2023/10/resource/manifest.provider.json @@ -1,8 +1,8 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.adapter.json", - "title": "Adapter", - "description": "Defines the DSC Resource as a DSC Resource Adapter. A DSC Resource Adapter enables users to manage resources that don't have their own manifests with DSC.", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.provider.json", + "title": "Provider", + "description": "Defines the DSC Resource as a DSC Resource Provider. A DSC Resource Provider enables users to manage resources that don't have their own manifests with DSC.", "type": "object", "required": [ "list", @@ -11,7 +11,7 @@ "properties": { "list": { "title": "List Command", - "description": "Defines how DSC must call the DSC Resource Adapter to list its supported DSC Resources.", + "description": "Defines how DSC must call the DSC Resource Provider to list its supported DSC Resources.", "type": "object", "required": [ "executable" @@ -27,7 +27,7 @@ }, "config": { "title": "Expected Configuration", - "description": "Defines whether the adapter expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", + "description": "Defines whether the provider expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", "type": "string", "enum": [ "full", @@ -50,4 +50,4 @@ } } ] -} +} diff --git a/schemas/src/outputs/resource/list.yaml b/schemas/src/outputs/resource/list.yaml index 770c402e..f6a09bc9 100644 --- a/schemas/src/outputs/resource/list.yaml +++ b/schemas/src/outputs/resource/list.yaml @@ -49,7 +49,7 @@ properties: type: string enum: - Command - + # Need to understand how this works to document it more usefully - title: Custom implementation description: >- @@ -82,9 +82,9 @@ properties: type: string pattern: ^\w+$ requires: - title: Required DSC Resource Adapter + title: Required DSC Resource Provider description: >- - Defines the fully qualified type name of the DSC Resource Adapter the + Defines the fully qualified type name of the DSC Resource Provider the DSC Resource depends on. oneOf: - $ref: ///definitions/resourceType.yaml diff --git a/schemas/src/resource/manifest.provider.yaml b/schemas/src/resource/manifest.provider.yaml index 39cf0f93..f1c704f0 100644 --- a/schemas/src/resource/manifest.provider.yaml +++ b/schemas/src/resource/manifest.provider.yaml @@ -1,20 +1,20 @@ # yaml-language-server: $schema=https://json-schema.org/draft/2020-12/schema $schema: https://json-schema.org/draft/2020-12/schema -$id: ///resource/manifest.adapter.yaml +$id: ///resource/manifest.provider.yaml -title: Adapter +title: Provider description: >- - Defines the DSC Resource as a DSC Resource Adapter. A DSC Resource Adapter enables users to + Defines the DSC Resource as a DSC Resource Provider. A DSC Resource Provider enables users to manage resources that don't have their own manifests with DSC. markdownDescription: | # VS Code only *** [_Online Documentation_][01] *** - Defines the DSC Resource as a DSC Resource Adapter. A DSC Resource Adapter enables users to + Defines the DSC Resource as a DSC Resource Provider. A DSC Resource Provider enables users to manage resources that don't have their own manifests with DSC. - [01]: /reference/schemas/resource/manifest/adapter? + [01]: /reference/schemas/resource/manifest/provider? type: object required: @@ -24,15 +24,15 @@ properties: list: title: List Command description: >- - Defines how DSC must call the DSC Resource Adapter to list its supported DSC Resources. + Defines how DSC must call the DSC Resource Provider to list its supported DSC Resources. markdownDescription: | # VS Code only *** [_Online Documentation_][01] *** - Defines how DSC must call the DSC Resource Adapter to list its supported DSC Resources. + Defines how DSC must call the DSC Resource Provider to list its supported DSC Resources. - [01]: /reference/schemas/resource/manifest/adapter?#list + [01]: /reference/schemas/resource/manifest/provider?#list type: object required: - executable @@ -49,7 +49,7 @@ properties: is only required when the command isn't recognizable by the operating system as an executable. - [01]: /reference/schemas/resource/manifest/adapter?#executable + [01]: /reference/schemas/resource/manifest/provider?#executable args: $ref: ///definitions/commandArgs.yaml markdownDescription: | @@ -75,11 +75,11 @@ properties: registry resources list ``` - [01]: /reference/schemas/resource/manifest/adapter?#args + [01]: /reference/schemas/resource/manifest/provider?#args config: title: Expected Configuration description: >- - Defines whether the adapter expects to receive a full and unprocessed configuration as a + Defines whether the provider expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations. type: string @@ -92,21 +92,21 @@ properties: [_Online Documentation_][01] *** - Defines whether the adapter expects to receive a full and unprocessed configuration as a + Defines whether the provider expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations. - [01]: /reference/schemas/resource/manifest/adapter?#config + [01]: /reference/schemas/resource/manifest/provider?#config markdownEnumDescriptions: - | # full _Full and unprocessed config as a JSON blob_ - > Indicates that the adapter expects a JSON blob containing the full and unprocessed + > Indicates that the provider expects a JSON blob containing the full and unprocessed > configuration as a single JSON blob over `stdin`. - | # sequence _Resource instances as JSON Lines_ - > Indicates that the adapter expects each resource's configuration as a [JSON Line][01] + > Indicates that the provider expects each resource's configuration as a [JSON Line][01] > over `stdin`. [01]: https://jsonlines.org/ @@ -125,7 +125,7 @@ examples: defaultSnippets: # VS Code only - label: ' Define without arguments' markdownDescription: | - Define the adapter config kind and `list` command for the resource when no arguments are + Define the provider config kind and `list` command for the resource when no arguments are required. body: config: $1 @@ -134,7 +134,7 @@ defaultSnippets: # VS Code only - label: ' Define with arguments' markdownDescription: | - Define the adapter config kind and `list` command for the resource when at least one + Define the provider config kind and `list` command for the resource when at least one argument is required. body: config: $1 diff --git a/schemas/src/resource/manifest.yaml b/schemas/src/resource/manifest.yaml index 637b6ded..5aaedf32 100644 --- a/schemas/src/resource/manifest.yaml +++ b/schemas/src/resource/manifest.yaml @@ -93,9 +93,9 @@ defaultSnippets: description: ${23:explanation of property purpose and usage} type: ${24|string,integer,number,array,object,null|} - - label: ' Define a resource (adapter)' + - label: ' Define a resource (provider)' markdownDescription: |- - Defines an adapter resource that enables users to define non-command-based DSC Resources in + Defines a provider resource that enables users to define non-command-based DSC Resources in the configuration. body: $schema: ///bundled/resource/manifest.yaml @@ -117,7 +117,7 @@ defaultSnippets: input: ${15:stdin} implementsPretest: ^${16:false} return: ${17:state} - adapter: + provider: config: ${18|full,sequence|} list: executable: ${19:executable name} @@ -191,23 +191,23 @@ properties: This property must be one of the canonical URLs for the version of the Command-based DSC Resource Manifest schema that the manifest is implemented for. - + For every version of the schema, there are three valid urls: ```yaml .../resource/manifest.json ``` - + > The URL to the canonical non-bundled schema. When it's used for validation, the validating > client needs to retrieve this schema and every schema it references. ```yaml .../bundled/resource/manifest.json ``` - + > The URL to the bundled schema. When it's used for validation, the validating client only > needs to retrieve this schema. - > + > > This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can > still validate the document when it uses this schema, other tools may error or behave > in unexpected ways. @@ -215,11 +215,11 @@ properties: ```yaml .../bundled/resource/manifest.vscode.json ``` - + > The URL to the enhanced authoring schema. This schema is much larger than the other > schemas, as it includes additional definitions that provide contextual help and snippets > that the others don't include. - > + > > This schema uses keywords that are only recognized by VS Code. While DSC can still > validate the document when it uses this schema, other tools may error or behave in > unexpected ways. @@ -266,8 +266,8 @@ properties: > > Indicates that the resource manifest adheres to the `2023/08` schema. This version > is deprecated, and should only be used for compatibility with `alpha.3` and earlier. - > Migrate to using the `` of the schema - + > Migrate to using the `` of the schema + > This URL points to the canonical non-bundled schema. When it's used for validation, the > validating client needs to retrieve this schema and every schema it references. @@ -373,8 +373,8 @@ properties: $ref: ///resource/manifest.test.yaml validate: $ref: ///resource/manifest.validate.yaml - adapter: - $ref: ///resource/manifest.adapter.yaml + provider: + $ref: ///resource/manifest.provider.yaml exitCodes: # This setting in the root of the schema implies exit codes must have the # same meaning across all executions. What about implementations that From 27f12baeac4d50b126f408e6b6938ae5bd88797e Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Thu, 29 Feb 2024 08:15:16 -0800 Subject: [PATCH 3/4] revert name of property back --- .../TestPSRepository/TestPSRepository.psm1 | 10 +++++----- .../TestPSRepository/TestPSRepository.schema.mof | 2 +- .../Tests/powershellgroup.resource.tests.ps1 | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/powershellgroup/Tests/PSTestModule/DscResources/TestPSRepository/TestPSRepository.psm1 b/powershellgroup/Tests/PSTestModule/DscResources/TestPSRepository/TestPSRepository.psm1 index a3da095f..7e05639c 100644 --- a/powershellgroup/Tests/PSTestModule/DscResources/TestPSRepository/TestPSRepository.psm1 +++ b/powershellgroup/Tests/PSTestModule/DscResources/TestPSRepository/TestPSRepository.psm1 @@ -21,7 +21,7 @@ function Get-TargetResource { PublishLocation = $null ScriptPublishLocation = $null InstallationPolicy = $null - PackageManagementAdapter = $null + PackageManagementProvider = $null Trusted = $false Registered = $false } @@ -33,7 +33,7 @@ function Get-TargetResource { $returnValue.PublishLocation = 'https://www.powershellgallery.com/api/v2/package/' $returnValue.ScriptPublishLocation = 'https://www.powershellgallery.com/api/v2/package/' $returnValue.InstallationPolicy = 'Untrusted' - $returnValue.PackageManagementAdapter = 'NuGet' + $returnValue.PackageManagementProvider = 'NuGet' $returnValue.Trusted = $False $returnValue.Registered = $True } @@ -55,10 +55,10 @@ function Test-TargetResource { [Parameter()] [System.String] - $PackageManagementAdapter + $PackageManagementProvider ) - if (($Name -eq "TestPSRepository1") -and ($PackageManagementAdapter -eq 'NuGet')) + if (($Name -eq "TestPSRepository1") -and ($PackageManagementProvider -eq 'NuGet')) { return $true } @@ -78,6 +78,6 @@ function Set-TargetResource { [Parameter()] [System.String] - $PackageManagementAdapter + $PackageManagementProvider ) } diff --git a/powershellgroup/Tests/PSTestModule/DscResources/TestPSRepository/TestPSRepository.schema.mof b/powershellgroup/Tests/PSTestModule/DscResources/TestPSRepository/TestPSRepository.schema.mof index 5dc745ca..dd1f0aa3 100644 --- a/powershellgroup/Tests/PSTestModule/DscResources/TestPSRepository/TestPSRepository.schema.mof +++ b/powershellgroup/Tests/PSTestModule/DscResources/TestPSRepository/TestPSRepository.schema.mof @@ -8,7 +8,7 @@ class TestPSRepository : OMI_BaseResource [Write] String PublishLocation; [Write] String ScriptPublishLocation; [Write, ValueMap{"Trusted","Untrusted"}, Values{"Trusted","Untrusted"}] String InstallationPolicy; - [Write] String PackageManagementAdapter; + [Write] String PackageManagementProvider; [Read] Boolean Trusted; [Read] Boolean Registered; }; diff --git a/powershellgroup/Tests/powershellgroup.resource.tests.ps1 b/powershellgroup/Tests/powershellgroup.resource.tests.ps1 index 38ec3e78..9ce6956a 100644 --- a/powershellgroup/Tests/powershellgroup.resource.tests.ps1 +++ b/powershellgroup/Tests/powershellgroup.resource.tests.ps1 @@ -62,7 +62,7 @@ Describe 'PowerShellGroup resource tests' { It 'Test works on script-based resource' -Skip:(!$IsWindows){ - $r = "{'Name':'TestPSRepository1','PackageManagementAdapter':'NuGet'}" | dsc resource test -r PSTestModule/TestPSRepository + $r = "{'Name':'TestPSRepository1','PackageManagementProvider':'NuGet'}" | dsc resource test -r PSTestModule/TestPSRepository $LASTEXITCODE | Should -Be 0 $res = $r | ConvertFrom-Json $res.actualState.InDesiredState | Should -Be $True From 86418f9b21d7832960fd0afb12f1e946bcbea180 Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Thu, 29 Feb 2024 08:16:13 -0800 Subject: [PATCH 4/4] fix registry resource description --- registry/registry.dsc.resource.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry/registry.dsc.resource.json b/registry/registry.dsc.resource.json index 6f920a1d..98110f41 100644 --- a/registry/registry.dsc.resource.json +++ b/registry/registry.dsc.resource.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/bundled/resource/manifest.json", "type": "Microsoft.Windows/Registry", - "description": "Registry configuration adapter for the Windows Registry", + "description": "Manage Windows Registry keys and values", "tags": [ "Windows", "NT"