Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-6323

DSC_Lite : Update generic dsc resource invoker to support CIM Instances

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Template:
    • Acceptance Criteria:
      Hide

      A user would be able to successfully use a DSC Resource which uses Complex Types like PSCredential, for example the User DSC Resource as provided below:

      dsc{'foouser':
        dsc_resource_name       => 'User',
        dsc_resource_module_name    => 'PSDesiredStateConfiguration',
        dsc_resource_properties => {
        username             => 'jane-doe',
        description          => 'Jane Doe user',
        ensure               => present,
        password             => {
          'user' => 'jane-doe',
          'password' =>'jane-password'
        },
        passwordneverexpires => false,
        disabled             => true,
        }
      }
      

      A user would be able to successfully use a DSC Resource which uses CimInstances, for example the xWebSite DSC Resource as provided below:

      dsc{'xWebsite':
        dsc_resource_name       => 'xWebsite',
        dsc_resource_module_name    => 'xWebAdministration',
        dsc_resource_properties => {
          'ensure'          => "Present",
          'name'            => "foo",
          'state'           => "Started",
          'physicalpath'    => "c:/inetpub/wwwroot",
          'bindinginfo' => {
            dsc_type_name => 'MSFT_xWebBindingInformation[]',
            dsc_properties => [
              {
                protocol => 'http'
              },
              {
                protocol => 'ftp'
              },
            ]
          }
        }
      }
      

      Show
      A user would be able to successfully use a DSC Resource which uses Complex Types like PSCredential, for example the User DSC Resource as provided below: dsc{'foouser': dsc_resource_name => 'User', dsc_resource_module_name => 'PSDesiredStateConfiguration', dsc_resource_properties => { username => 'jane-doe', description => 'Jane Doe user', ensure => present, password => { 'user' => 'jane-doe', 'password' =>'jane-password' }, passwordneverexpires => false, disabled => true, } } A user would be able to successfully use a DSC Resource which uses CimInstances, for example the xWebSite DSC Resource as provided below: dsc{'xWebsite': dsc_resource_name => 'xWebsite', dsc_resource_module_name => 'xWebAdministration', dsc_resource_properties => { 'ensure' => "Present", 'name' => "foo", 'state' => "Started", 'physicalpath' => "c:/inetpub/wwwroot", 'bindinginfo' => { dsc_type_name => 'MSFT_xWebBindingInformation[]', dsc_properties => [ { protocol => 'http' }, { protocol => 'ftp' }, ] } } }
    • Epic Link:
    • Team:
      Windows
    • Sprint:
      Windows Kanban
    • QA Risk Assessment:
      Needs Assessment

      Description

      In ticket MODULES-5842 the generic `dsc` type was added to the dsc_lite module, which implemented the basic type and provider needed in order to invoke DSC Resources without the puppet type system we used in the previous puppet dsc module.

      This ticket will extend the work in MODULES-5842 by adding CIM Instance support to the generic `dsc` type. In DSC, a CimInstance is a typed hash that allows specifying a complex type that will be able to be serialized across process boundaries. The implementation will have to allow the user to specify a generic hash of properties, but also specify the CimInstance type they are supposed to be in order for our provider to know how to correctly format the resulting PowerShell code.

      This is the current thought on the api design:

      dsc{'xWebsite':
        dsc_resource_name       => 'xWebsite',
        dsc_resource_module_name    => 'xWebAdministration',
        dsc_resource_properties => {
          'ensure'          => "Present",
          'name'            => "foo",
          'state'           => "Started",
          'physicalpath'    => "c:/inetpub/wwwroot",
          'bindinginfo' => {
            dsc_type_name => 'MSFT_xWebBindingInformation[]',
            dsc_properties => [
              {
                protocol => 'http'
              },
              {
                protocol => 'ftp'
              },
            ]
          }
        }
      }
      

        Attachments

          Activity

            People

            Assignee:
            ethan Ethan Brown
            Reporter:
            james.pogran James Pogran
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support